-
Notifications
You must be signed in to change notification settings - Fork 248
Upgrade to webpack@2 #421
Comments
I think webpack 2 is stable enough to be used in phenomic. I use it in several projects right now. I read somewhere that webpack's team is focused on making the documentation better atm. And working on the next version. |
Same here, using v2 for a while now. Indeed they works on the doc to remove "beta" flag :) |
I gave this a try and find out that, because of the mix between node and webpack environment, we can't disable commonjs module transformation in babel :/ . Any suggestions? |
We might disable it for client build, not node build. Not possible? |
AFAIK, It's not possible (or I'm overthinking). |
We are talking about disabling/enabling a specific babel plugin depending on the env right? |
I give this another try tonight. |
Will try too. I won't cut a new release until this is done anyway, since #714 sucks! |
On it. |
OK it was alsmost easy until you want to disable es2015 modules for webpack only :) |
Now the tricky part is react-hot-loader update :) |
👍 |
You now must use webpack 2. Don’t worry if it’s still tagged beta, it won’t it already usable for months and will be tagged as stable really soon. This will mainly improve performance & size of the bundle (which increased in recent version) thank to the [tree shaking feature ](http://blog.sethladd.com/2013/01/minification-is-not-enough-you-need.h tml). You might need to update some babel packages to latest version (especially babel-preset-es2015, to get the `modules` option). You will need to: - add new sections in your ``babel.env`` configuration. webpack 2 understand natively ``import``statements so it’s unnecessary to transform those (and it will allow webpack 2 enable tree shaking): ``webpack-develompment`` & ``webpack-production``. Check out this commit for detail (or take a look to the up to date boilerplate). - disable ``webpack.optimize.DedupePlugin`` as it’s not working yet in webpack 2 - update ``ExtractTextPlugin`` usage Closes #421
Tracking this mzgoddard/hard-source-webpack-plugin#27 |
Closing in favor of #737 |
I am currently trying it on a project and there is not a lot of breaking changes, so should not be a big deal.
Still flagged as beta, but for a while so I think it's pretty mature now.
The text was updated successfully, but these errors were encountered: