A dead-code elimination technique that removes unused code from the final bundle by analyzing which exports are actually imported and used. It works by tracing through the dependency graph and only including code that is reachable from entry points.
The term was popularized by Rich Harris (creator of Rollup) around 2015, drawing from the metaphor of shaking a tree to make dead leaves fall off. The concept builds on decades of compiler optimization techniques but became crucial with the rise of large JavaScript module ecosystems.
Tree shaking is like cleaning out your closet before moving - you only pack the clothes you actually wear, not every piece you've ever owned! This can reduce JavaScript bundle sizes by 50% or more, making websites load dramatically faster by eliminating all those utility functions you imported but never used.
Complete word intelligence in one call. Free tier — 50 lookups/day.