Tree-shaking doesn't work
See original GitHub issueI’m building a component library that uses TooltipTrigger
(version 2.11.1
). Unfortunately, it breaks tree-shaking by probably introducing some side-effects. I’m building with Rollup.
Issue Analytics
- State:
- Created 3 years ago
- Comments:31 (13 by maintainers)
Top Results From Across the Web
Tree shaking doesn't work as expected · Issue #10034 - GitHub
Hello, I tried to made a react component library. I want to export library as ES Module. I want that each application using...
Read more >Webpack Tree Shaking not working when importing from a file ...
If I remove the moment import from module.js tree shaking works fine and i only see square in my bundle. Is this how...
Read more >Tree Shaking - webpack
Tree shaking is a term commonly used in the JavaScript context for dead-code elimination. It relies on the static structure of ES2015 module...
Read more >How I fixed webpack tree shaking in 3 easy steps
Tree shaking is an important step in Webpack bundling to get rid of unused stuff. This should help describe how to easily get...
Read more >Tree-Shaking Problems with Component Libraries - Medium
Tree-shaking isn't magic, and much like the garbage collector, ... However, it doesn't go any further to say how best to use them....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We just release the hook version of the library. Could you please check if this is still an issue?
So I had a nice discussion with a colleague of mine about this and I finally hit the nail, realising my mistake. I totally understand why it should be externalised now and the exact difference to a peer dependency. Thanks for the great support. 👍