If you like Bundler, you’ll like Yarn’s integration into Webpacker
A Slow Slog to Setup
Since these are relatively new systems, there are certainly going to be small issues for certain setups, especially if you’re migrating an existing project. I’d recommend starting with a new project just to test setting everything up from scratch. I learned a lot reading the first chapter of Rails, Angular, Postgres, and Boostrap, which covered setting everything up in a new project. Then once you’ve succeeded with a small, isolated project, you can try it on your current project.
Since it’s a new technology stack, expect some form of a learning cureve. For example, I spent half an hour debugging why some CSS stylesheet appeared in the my pack in the browser, but didn’t have any CSS in it. I finally realized that I was missing the
stylesheet_pack_tag in the
application.html.erb, and when I put that line of code in, everything worked well.
I’d recommend Webpack for your Rails app
Then try out it out with one of my Stimulus.js Tutorials that I’ve been publishing. I think you’ll begin to see the full potential of Webpack inside your Rails app, despite the occasionally obtuse setup.
Want To Learn More?
Try out some more of my Stimulus.js Tutorials.