Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack v4 #1224

Closed
mikecx opened this issue Jan 26, 2018 · 15 comments
Closed

Webpack v4 #1224

mikecx opened this issue Jan 26, 2018 · 15 comments

Comments

@mikecx
Copy link

mikecx commented Jan 26, 2018

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.

@gauravtiwari
Copy link
Member

@mikecx Thanks - yep once stable version is released.

@renchap
Copy link
Contributor

renchap commented Feb 25, 2018

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.

@guilleiguaran
Copy link
Member

@renchap there is any upgrade guide for Webpack 3 -> 4?

@renchap
Copy link
Contributor

renchap commented Feb 25, 2018

The migration guide is not yet published (webpack/webpack.js.org#1706).

The one for the alpha version is mostly up-to-date and should be fine: webpack/webpack#6357 (at the end of the top post)

Other useful links:

@rhazegh
Copy link

rhazegh commented Feb 25, 2018

Looking forward to using webpack 4.0.

Hopefully it will help with lengthy build times on heroku.

@dbalatero
Copy link
Contributor

@gauravtiwari do you need assistance with getting webpack v4 working? I'd be glad to help if so.

@gauravtiwari
Copy link
Member

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 :)

@renchap
Copy link
Contributor

renchap commented Feb 28, 2018

I can also help if needed (testing or implementing). But we need to coordinate to not do the work twice :)

@gauravtiwari
Copy link
Member

Just published a pre-version with initial Webpack 4.0 support:

To try out:

gem 'webpacker', '>= 4.0.x'
yarn add @rails/webpacker

@faceyspacey
Copy link

@gauravtiwari awesome!! Gonna try it out now.

@adaam2
Copy link

adaam2 commented Apr 13, 2018

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"
  }

@gauravtiwari
Copy link
Member

@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?

@adaam2
Copy link

adaam2 commented Apr 13, 2018

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

@JakeLaCombe
Copy link
Contributor

Is there by chance a timeline available for when it will be officially released?

@zedtux
Copy link

zedtux commented Oct 14, 2018

@adaam2's solution works fine for me, thank you !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants