Closed Mrtenz closed 1 year ago
I'm concerned about the cases a package is created using this template that actually has side effects and the import of the side effect gets removed, maybe we should have a explicit README
section to remember to change this option.
I'm concerned about the cases a package is created using this template that actually has side effects and the import of the side effect gets removed, maybe we should have a explicit
README
section to remember to change this option.
Good point. I've added a mention to the README.
By setting
sideEffects: false
, we can mark the package as side-effect-free:https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free
This will improve the effectiveness of tree-shaking.