npm run build
src/sideEffects.js
src/module/big-module
there is no sideEffects configsrc/module/big-module-with-flag
this have sideEffects configlodash-es@4.17.10
- node v8.5.0
- npm v6.0.0
- webpack @4.10.2
babel transform the module to commonjs, webpack can't treeshaking the commonjs module.
we should config below, let webpack deal with the row code, since the webpack@2, webpack can deal with es6 import and export default syntax.
{
"presets": [
["env", {
"modules": false
}]
]
}