You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
0.10 prerelease with webpack 2 increases bundle size #1843
I'd be surprised if it was Uglify. I suspect some polyfill we happen to bundle (e.g. process) got larger, something changed at module boundaries, or some pattern got harder to uglify (e.g. something that used to repeat in Webpack 1 is now unique every time defeating compression in Webpack 2).
Need to look at minimal bundles from both. Also at minimal bundles without React for both.
I don't know if it's useful but I marked up a few of the differences on 0.10.0. lodash appears to be included twice (two large purple boxes), I'm not certain what's going on there. Generally all parts in 0.10.0 are smaller by up to a couple of kb but there were some exceptions (significant decrease (green), no change (blue), increase(red)) and some name changes from lib to es or Nnn to Nnn-es (purple smaller boxes).
Closing this as unactionable by us; webpack updated its node stubs which are now larger -- we've actually removed some of these stubs by default now so your bundle might have shrunk.
Feel free to open a new issue if someone has something compelling.
Activity
Timer commentedon Mar 17, 2017
Part of the reason is because of webpack/webpack#4493. I'm not sure why the existing build is growing so much ... probably the same reason (I'd hope).
Can you look at this with source-map-explorer as explained in #1641?
Unfortunately we cannot leverage tree-shaking yet (and are using babel to compile to commonjs) because sourcemaps are broken (webpack/webpack#4423), and tree-shaking actually doesn't work at all (webpack/webpack#2867, webpack/webpack#2899, webpack/webpack#3092).
gavinwahl commentedon Mar 17, 2017
0.9.5:

0.10.0:

Now I'm confused...source-ma-explorer is reporting the 0.10.0 as smaller...maybe it got less compressible?
Timer commentedon Mar 17, 2017
Interesting... I wonder if webpack 1 vs 2 have different versions of uglify and there was a regression on that front...
Unless if we regressed in our configuration.
Timer commentedon Mar 17, 2017
Maybe the default configuration changed, can you try some of the options in #1644? You can edit the config file in your
node_modules.gaearon commentedon Mar 17, 2017
I'd be surprised if it was Uglify. I suspect some polyfill we happen to bundle (e.g. process) got larger, something changed at module boundaries, or some pattern got harder to uglify (e.g. something that used to repeat in Webpack 1 is now unique every time defeating compression in Webpack 2).
Need to look at minimal bundles from both. Also at minimal bundles without React for both.
AJamesPhillips commentedon Mar 21, 2017
I don't know if it's useful but I marked up a few of the differences on 0.10.0. lodash appears to be included twice (two large purple boxes), I'm not certain what's going on there. Generally all parts in 0.10.0 are smaller by up to a couple of kb but there were some exceptions (significant decrease (green), no change (blue), increase(red)) and some name changes from
libtoesorNnntoNnn-es(purple smaller boxes).watert commentedon Apr 11, 2017
@AJamesPhillips how is this log printed? seems great.
AJamesPhillips commentedon Apr 11, 2017
@watert I just took the screen shots from gavinwahl's posts above. He might have followed the instructions Timer link to in his comment.
Timer commentedon Aug 2, 2017
Closing this as unactionable by us; webpack updated its node stubs which are now larger -- we've actually removed some of these stubs by default now so your bundle might have shrunk.
Feel free to open a new issue if someone has something compelling.