Back to Glossary
PerformanceIntermediate

What is Tree Shaking?

Automatically removing unused code from your final bundle to make it smaller.

Why It Matters

Tree shaking reduces the amount of JavaScript sent to browsers, making your site load faster.

Real-World Example

If you import only one function from a large library, tree shaking removes all the unused functions from your bundle.

“Understanding terms like Tree Shaking matters because it helps you have better conversations with developers and make smarter decisions about your software. You do not need to be technical. You just need to know enough to ask the right questions.”

Callum Holt, Founder, 13Labs

From definition to deployment

Knowing the term is step one. Using it in something real is the rest.