Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




Webpack 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.


It will on or after October 10th, which is when the next version of Webpack is slated to release.


Wait they’ve announced a date? The Webpack 5 project board on GitHub still has a bunch of items not done yet.





Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: