Upgrading rails/webpacker v3.5 to v4
The following steps can be followed to update a Webpacker v3.5 app to v4.
- Update the gem
webpacker
and the package@rails/webpacker
- Merge changes from the new default .babelrc to your
/.babelrc
. If you are using React, you need to add"@babel/preset-react"
, to the list ofpresets
. - Copy the file .browserslistrc to
/
. - Merge any differences between config/webpacker.yml and your
/config/webpacker.yml
.
Here is an example commit of these changes.