🔗 Tree Shaking
🔗 Science
In computing, tree shaking is a dead code elimination technique that is applied when optimizing code written in ECMAScript dialects like JavaScript or TypeScript into a single bundle that is loaded by a web browser. Often contrasted with traditional single-library dead code elimination techniques common to minifiers, tree shaking eliminates unused functions from across the bundle by starting at the entry point and only including functions that may be executed. It is succinctly described as "live code inclusion".
Discussed on
- "Tree Shaking" | 2021-08-01 | 36 Upvotes 33 Comments