JavaScript Performance · AuditJet Glossary
Tree Shaking
A dead code elimination technique used by JavaScript bundlers to remove unused exports from the final bundle.
Tree shaking works by analysing the dependency graph of ES modules and removing any exports that are never imported. It's supported by Webpack, Rollup, and esbuild. Effective tree shaking requires using ES module syntax (import/export) rather than CommonJS. Unused library code is a common cause of bloated JavaScript bundles that inflate TBT and INP.
Related terms
A technique that splits JavaScript bundles into smaller chunks that are loaded on demand rather than all at once.
The total time between First Contentful Paint and Time to Interactive during which the main thread was blocked for long enough to prevent input responsiveness.
Frequently asked questions
What is Tree Shaking?
A dead code elimination technique used by JavaScript bundlers to remove unused exports from the final bundle.
How does AuditJet measure Tree Shaking?
AuditJet runs automated Google Lighthouse audits that surface Tree Shaking scores alongside actionable fix guidance. You can track Tree Shaking trends across all your pages and receive alerts when the metric regresses.
Monitor Tree continuously
AuditJet tracks Core Web Vitals on a schedule with revenue impact alerts — powered by Google Lighthouse and Google PageSpeed Insights.
Start Free