question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tree-shaking doesn't work

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Comments:31 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
denisborovikovcommented, Jan 26, 2021

We just release the hook version of the library. Could you please check if this is still an issue?

2reactions
adi518commented, Jul 24, 2020

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. 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found