The art of tree-shaking
summary
Lucide Icons grows from 2019 to 29,400 icons and forces hard choices: ES module exports, declaring sideEffects: false (only when certain), and splitting large files so bundlers like Rollup and Vite can actually drop unused code. Concrete fixes: export individual functions instead of class wrappers, avoid import * as obj or huge JSON blobs, inject form inputs rather than one monolithic generator, use bundle visualizers, and watch CommonJS deps such as axios or moment that block tree‑shaking.
AI-written summary · about
chapters (5)
related talks
16mThe Art of Tree-Shaking
21mTree Shaking — Deploy Even Less Code to Production
07mCodemod-ing away 4MB of JavaScript
41mHigh-Performance Web UI with Web Components
32mLet's Tree-shake it...
45mDark Art of Webpack Bundle Tuning
23mStreamline your code with webpack
28mDecoding JavaScript: Loading Performance —
