Tree-shaking removes unused code from a program by analyzing module dependencies and exports. It helps limit browser code bloat: even code that never runs still has to be downloaded and parsed, using bandwidth and CPU. section 1.4.1 section 13.0
ES modules enable better tree-shaking, one engineering reason for their growing use in JavaScript. Tree-shaking is one way to reduce unnecessary code; production flags and lazy loading are other approaches. section 1.4.1 section 13.0




