3 ms·
Up until very recently, tree-shaking JavaScript code was essentially impossible due to the dynamic nature of commonjs and AMD. Thanks to the new static module s
by joshuacc 11y ago
Up until very recently, tree-shaking JavaScript code was essentially impossible due to the dynamic nature of commonjs and AMD. Thanks to the new static module system in ES6, Rollup and Webpack 2 will be able to support tree shaking of ES6 modules. But the vast majority of modules out there are still commonjs, and it will be quite a while before that changes.