Didn't see another issue in the search for it but with Webpack v4 on the horizon and potentially being a stable release in about a month, is there work being done to update webpacker? The promise of less configuration, better build speeds, and smaller builds already has me excited.
@mikecx Thanks - yep once stable version is released.
Webpack v4 is now released: https://github.com/webpack/webpack/releases/tag/v4.0.0
Do you already have a defined plan to switch to it? It brings a whole lot of goodness.
@renchap there is any upgrade guide for Webpack 3 -> 4?
The migration guide is not yet published (https://github.com/webpack/webpack.js.org/issues/1706).
The one for the alpha version is mostly up-to-date and should be fine: https://github.com/webpack/webpack/issues/6357 (at the end of the top post)
Other useful links:
Looking forward to using webpack 4.0.
Hopefully it will help with lengthy build times on heroku.
@gauravtiwari do you need assistance with getting webpack v4 working? I'd be glad to help if so.
Thanks @dbalatero 馃崼
I was thinking to do some groundwork (#1304 ) first before making an upgrade to v4. Also, noticed one of the plugins we use i.e. manifest plugin is still in RC. Would be great if you could help with some reviewing later :)
I can also help if needed (testing or implementing). But we need to coordinate to not do the work twice :)
Just published a pre-version with initial Webpack 4.0 support:
To try out:
gem 'webpacker', '>= 4.0.x'
yarn add @rails/webpacker
@gauravtiwari awesome!! Gonna try it out now.
Even after upgrading @rails/webpacker, I was still running into this problem. However there is another solution to fix this issue, which is by using resolutions to ensure that the webpacker version of extract-text-webpack-plugin is the new webpack v4 one:
"resolutions": {
"@rails/webpacker/extract-text-webpack-plugin": "^4.0.0-beta.0"
}
@adaam2 Webpacker is using mini-css-extract-plugin now - https://github.com/rails/webpacker/blob/master/package.json#L28
Have you upgraded both npm package and ruby gem including deps?
I'll take a look at this tonight. I believe my Webpacker dep definition in my package.json is ^4.0.0-pre.2 and my Gemfile version is ^4.0.0-pre.2
Is there by chance a timeline available for when it will be officially released?
@adaam2's solution works fine for me, thank you !!
Most helpful comment
Is there by chance a timeline available for when it will be officially released?