encyclopegia.org

Tree shaking

In computing, tree shaking is a dead code elimination technique that is applied when bundling code with its dependencies.[src] It is most commonly applied to dynamic languages, in practice most commonly JavaScript/ECMAScript.[src] 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.[src] It is succinctly described as "live code inclusion".[src] In less-dynamic languages such as C, ordinary dead-code elimination becomes equivalent to tree-shaking with whole program optimization, which also uses knowledge of entry points.[src]

In computing, tree shaking is a dead code elimination technique that is applied when bundling code with its dependencies.[src] It is most commonly applied to dynamic languages, in practice most commonly JavaScript/ECMAScript.[src] 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.[src] It is succinctly described as "live code inclusion".[src] In less-dynamic languages such as C, ordinary dead-code elimination becomes equivalent to tree-shaking with whole program optimization, which also uses knowledge of entry points.[src]

10 sentences · 10 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Tree shaking." encyclopegia.org, 2026, https://encyclopegia.org/wiki/tree-shaking. Accessed 26 November 2026.

Chicago

"Tree shaking." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/tree-shaking.

APA

encyclopegia.org. (2026). Tree shaking. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/tree-shaking

Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Ti -Tree

stub · references available

Siberian Tree Frog

stub · references available

Olive-tree Warbler

stub · references available

Tree Pipit

stub · references available

Matschie's tree-kangaroo

stub · references available

phylogenetic tree

stub · references available

Gray-bellied pencil-tailed tree-mouse

stub · references available

Pallid Atlantic Tree-rat

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1365118818 · 0.5 · snapshot enwiki-001365118818

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.