-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpacker has been retired #83
Comments
So I spent today trying out the new importmap system (https://github.com/rails/importmap-rails/). It is very nice and I think could greatly simplify our JS pipeline. It also goes hand-in-hand with Turbo (https://turbo.hotwired.dev/) and Stimulus (https://stimulus.hotwired.dev/), which if we adopted would allow us to drop some old/heavy dependencies (e.g. jquery!) and tidy up our Javascript modules significantly. That said, in the end I gave up trying to get all three to work with Rails 6. I don't really know what the problem is but suspect it's something to do with having importmaps running alongside webpacker at the same time. Long story short: I would suggest upgrading to Rails 7 first, then switching webpacker -> importmap, jquery -> stimulus, our JS modules -> stimulus controllers, and CSS dependencies -> (gems? cssbundling?) all at once. |
That makes perfect sense to me. I had also experimented a bit, and from experience I can only confirm the assessment. Which of us should take responsibility for this? Have you immersed yourself in it to the extent that it can be done quickly for you, or can I take on this task (but not until the end of next week at the earliest)? |
Not quickly... but it would be nice to do it in my data entry branch, since I'm writing a fair bit of JS and it would help to have it cleanly organised as Stimulus controllers. But the main thing I'm not confident about is the upgrade to Rails 7: maybe you could do that, then I'll merge it into my branch and do the migration to importmaps etc.? |
A new alternative is shakapacker (which wraps newer versions of webpack for rails): https://github.com/shakacode/shakapacker The migration process looks... unpleasant. |
Useful discussion of webpacker alternatives: decidim/decidim#8783 |
#305 replaced webpacker (and sprockets) with propshaft + jsbundling + esbuild + cssbundling. |
See https://github.com/rails/webpacker
The text was updated successfully, but these errors were encountered: