Tree Shaking
In plain terms
Removing unused code from the final bundle.
Going deeper
Tree shaking analyzes module imports and strips out code that's never used, shrinking bundle size. It relies on static ES module structure.
Under the hood
Works best with ES modules and side-effect-free code; bundlers like Rollup/Webpack perform it.
Examples
Reducing JS bundle size, importing only used lodash functions, Rollup builds.
Think of it like...
Like shaking a tree so only the dead leaves (unused code) fall away.