I use gem 'webpacker', '>= 4.0.x'. But in my package.json the @rails/webpacker is ^3.5.3.
In the package.json. I think
"webpack": "^3.11.0",
"webpack-manifest-plugin": "^1.3.2"
should in devDependencies, dependencies
I use gem 'webpacker', '>= 4.0.x'. But in my package.json the @rails/webpacker is ^3.5.3.
Have you looked at https://github.com/rails/webpacker#upgrading? In particular "yarn upgrade ..."
should in devDependencies, dependencies
Have you looked at https://github.com/rails/webpacker/pull/1208
I think running bundle exec rails webpacker:install overwrites the 4.0.x pre-release.
After commenting out this:
https://github.com/rails/webpacker/blob/9c4612803a791eede4610eaf4ea458ebe4e493c9/lib/install/template.rb#L50-L51
I was able to get the 4.0.x version of webpacker installed with these:
# Gemfile
gem 'webpacker', '>= 4.0.x'
yarn add @rails/[email protected]
bundle exec rake webpacker:install
If my understanding is correct, using the specific version in the install task should fix the issue.
would upgrading the Webpacker v4 also bring in webpack v4?
@Lasvad Yes :)
Made a pre-release (with babel 7 support):
yarn add @rails/webpacker@next
bundle update webpacker
Most helpful comment
I think running
bundle exec rails webpacker:installoverwrites the 4.0.x pre-release.