Rollup Tree-Shaking and the sideEffects Field: An Architecture Note
How Rollup decides which modules to drop, why package.json sideEffects is a trust boundary, and the checks that catch a wrong declaration before users do.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
How Rollup decides which modules to drop, why package.json sideEffects is a trust boundary, and the checks that catch a wrong declaration before users do.
Goal Enable tree-shaking of namespace imports ( import * as ns from 'pkg' ) when a dependency declares "sideEffects": false in its package.json , so that unused bindings are eliminated from the bundle. Constraints and uncertainty Rollup 4.x currently treats namespace imports as opaque references that prevent elimination of any exported binding, even when the