5 ms·
Can this be useful when someone uses webpack?
by wmkthpn 9y ago
Can this be useful when someone uses webpack?
- neilsimp1 9y agoWhy would it be any different if they weren't? Unused code is unused code.
- wmkthpn 9y agoWebpack bundles everything up into one huge .js file, I gotta try how it works with that. Plus in my current environment (ReactJS + TypeScript + MobX + Webpack) tslint generates errors when I have unused variables and that breaks TeamCity build. No matter what, this tool is super useful!
- shroom 9y agoYou can do code splitting with Webpack it's a matter of config and how your code is organized. https://webpack.github.io/docs/code-splitting.html https://webpack.github.io/docs/code-splitting.html
- Matthias247 9y agoI think it would be interesting if this works with source-maps, that are created from things like webpack or compilers/transpilers. The unused code which ends-up in the browser might result from unused code in original files which looks slightly differently, and it's interesting where it comes from.
- phatbyte 9y agoWebpack already does this see: https://webpack.js.org/guides/tree-shaking/ https://webpack.js.org/guides/tree-shaking/