Webpacker: @rails/webpacker version

Created on 14 May 2018  路  6Comments  路  Source: rails/webpacker

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

Most helpful comment

I think running bundle exec rails webpacker:install overwrites the 4.0.x pre-release.

All 6 comments

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
Was this page helpful?
0 / 5 - 0 ratings