hoist-non-react-statics
hoist-non-react-statics copied to clipboard
Improved tree shaking in the library by adding sideEffects = false
We can hel webpack remove code if we mark package without side effects - https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free
Coverage remained the same at 88.05% when pulling cd7e7b44f9a1de79ebcfc334768b7fc53857993c on Tom910:improve-tree-shaking into 3b8def968f74b10adbc8c66b8babc0e0c6390a64 on mridgway:master.
Coverage remained the same at 88.05% when pulling cd7e7b44f9a1de79ebcfc334768b7fc53857993c on Tom910:improve-tree-shaking into 3b8def968f74b10adbc8c66b8babc0e0c6390a64 on mridgway:master.
Probably won't work without this https://github.com/mridgway/hoist-non-react-statics/pull/86
Probably won't work without this
Yes, you right it changes don't work for webpack 4. But if we used webpack 5 work fine. I create a repo for testing tree shaking - https://github.com/Tom910/webpack-tree-shaking-commonjs-mix
With sideEffect=false
Without sideEffect