webpack / webpack.js.org

Repository for webpack documentation and more!
https://webpack.js.org
Creative Commons Attribution 4.0 International
2.21k stars 3.31k forks source link

Tree shaking clarification #7414

Open yishay-at-bay opened 1 month ago

yishay-at-bay commented 1 month ago

Feature to document Tree shaking

Author(s)

Additional information In the tree shaking documentation here there is an example that includes the Shopify project. The example lacks some details about the full structure of the files and is a bit hard to understand. It would be great if you can write more about the logic behind the sideEffect flag and maybe even give a full example of a npm package with some css assets that contain side effects and how it is ignored mistakenly by a consumer app if the sideEffect flag is set to false

[ ] I am willing to work on this issue and submit a pull request.