Rollup Tree-Shaking: How Static Imports Shrink Your Bundle (and What Breaks It)
Rollup's tree-shaking works because ES modules are statically analyzable. Here's how it prunes unused code, a verifiable example, and the side-effect and CommonJS pitfalls that defeat it.