3 ms·
> allows end users to shave off up to half of the runtime size via tree-shaking Doesn’t webpack support actual tree-shaking (not just modules) or is that still
by jiofih 6y ago
> allows end users to shave off up to half of the runtime size via tree-shaking
Doesn’t webpack support actual tree-shaking (not just modules) or is that still a Rollup-only feature? There should be little difference in size in importing packages vs files if tree-shaking is on.
- j-krieger 6y agoWebpack doesn't support actual, statically checked tree shaking for now. There is a parameter called ''sideEffects'' you can employ in your package.json, which if switched to off gives hints to the compiler that your code is side-effect free and can thus be eliminated if not used.
- wishinghand 6y agoIt will on or after October 10th, which is when the next version of Webpack is slated to release.
- httgp 6y agoWait they’ve announced a date? The Webpack 5 project board on GitHub still has a bunch of items not done yet.
- wishinghand 6y agohttps://github.com/webpack/webpack/issues/11406 https://github.com/webpack/webpack/issues/11406