Aug 22, 2024

Tree Shaking the Bytes Away

Francesco Novy

Are massive JavaScript bundles hurting your load speeds? Master tree shaking and composition patterns to systematically eliminate dead code and ship lightning-fast web apps.

Pause
Mute Enter Fullscreen
#1 about 3 min

Managing the cost of unused JavaScript in software bundles

Distributing comprehensive developer tools requires minimizing the unnecessary code that eventually reaches end users.

#2 about 6 min

Understanding the role of bundlers in tree shaking

How build tools process entry points to reduce final bundle sizes by dropping unused dependencies.

#3 about 2 min

Generating dependency graphs through static analysis in bundlers

Bundlers evaluate source code at build time to construct a dependency graph that excludes unreferenced functions.

#4 about 3 min

Writing static code to enable effective bundler optimization

Structuring dynamic runtime logic into static declarations allows bundlers to safely strip unreached alternative execution paths.

#5 about 3 min

Testing module tree shaking efficiency with size-limit tooling

Defining automated testing scenarios in continuous integration pipelines prevents optional features from unintentionally inflating bundle weight.

#6 about 6 min

Improving module isolation by adopting code composition patterns

Passing capabilities as composable function arguments instead of boolean parameters ensures aggressive dead code removal.

#7 about 4 min

Replacing dynamic configurations with static build-time flags

Swapping text placeholders during compilation produces discrete build outputs for production versus local development environments.

#8 about 5 min

Addressing environment variables and barrel file export challenges

Exploring common tree shaking considerations regarding environment files, developer experience trade-offs, and native bundler behaviors.

Matching moments

2:54 min

Reducing JavaScript bundle sizes with build tools

Shem Magnezi Shem Magnezi Β· WWC 2025

1:22 min

Understanding tree shaking concepts in modern bundlers

Stephen Cooper Stephen Cooper Β· WWC 2025

4:18 min

Reducing JavaScript bundle sizes for multiplied carbon savings

Lorenzo Pieri Β· LIVE

4:10 min

Benchmarking execution speed and bundle size across module systems

Jolo Jolo Β· WWC 2024

1:11 min

Fundamentals of JavaScript minification and internal variable mangling

Stephen Cooper Stephen Cooper Β· WWC 2025

2:00 min

Optimizing bundle sizing using customized Emscripten compilation flags

PaweΕ‚ Aniszewski PaweΕ‚ Aniszewski Β· Europe 2026 Virtual

Upcoming sessions on this topic

Open session

World Congress 2026 North America

Merging at Scale: From Broken Builds to Green Mainline

Preetam Dwivedi, Manjari Akella

Preetam Dwivedi
Manjari Akella
Open session

World Congress 2026 North America

Offloading IoT State: Solving the Memory Crisis on Legacy Hardware

Pravin Nagare

Senior Software Engineer, Roku

Pravin Nagare
Open session

World Congress 2026 North America

When Humans Stop Writing Code: Rethinking Languages, Compilers, and Responsibility

Simon Auer

Organizer of flutter vienna meetup and CEO of marqably

Simon Auer
Open session

World Congress 2026 North America

Don’t kill my Vibes - Simple Steps to Stay Secure when Vibe Coding

Isaac Evans

Co-founder & CEO of Semgrep

Isaac Evans
Open session

World Congress 2026 North America

public void saveMoney(AI): The Developer's Guide to Unit Economics

Hrushikesh Pokala

Senior Software Engineer Lead at Equifax

Hrushikesh Pokala
Open session

World Congress 2026 North America

How to generate business value through performance optimizations

Nikolai Sidiropulo

Software Engineer at Meta

Nikolai Sidiropulo