refugerestrooms
refugerestrooms copied to clipboard
Migrate to Webpack 5 and Upgrade Node.js to 20
Context
- Fixes #682
- To update Node.js, this PR migrates the project from Webpacker to Webpack 5 using jsbundling-rails. Initially, I also tried Shakapacker, but it seemed to require more effort. Since I am not an expert in Webpack (I primarily use importmap-rails at work), I may not be aware of all the considerations. However, if there is a compelling reason to use Shakapacker, I am open to retrying the migration.
- While tests are passing, we need to verify that the bundling works correctly on the production server and in other developers' dev environments.
Summary of Changes
- Following the jsbundling-rails guide, replaced Webpacker with Webpack and jsbundling-rails.
- Following the Webpack migration guide, upgraded Webpack to 5.
- Upgraded Node.js to 20.
Checklist
- [ ] Tested Mobile Responsiveness
- [ ] Added Unit Tests
- [ ] CI Passes
- [ ] Deploys to Heroku on test Correctly (Maintainers will handle)
- [ ] Added Documentation (Service and Code when required)