World Congress 2025

A Practical Guide to Reducing Bundle Size

July 11, 2025 09:00 โ€“ 09:30 ยท 30 min Stage 10
performance javascript typescript

What this session covers

When it comes to bundle size, less really is more! But how do we ensure that our code can be effectively tree-shaken and minimised?

There are common code patterns that break tree-shaking and prevent minification from doing much at all. Let me share practical insights from my experience optimising a component library that will help you do the same and shed the excess from your bundles.

The talk is split into 2 halves: tree-shaking / minification.

Will explain tree-shaking then show coding patterns that prevent the bundler from being able to drop code. Will then cover sideEffects / pure code annotations. Then how to test tree shaking is working and demo source-map-explorer.

Then will cover minification and how to optimise what the bundler can minify. #private variables unlock great savings but there are issues with downleveling for older build targets.

The talk finishes with a quick overview of different build tools and the speed / size trade off.

Related talks at this congress

Open session

World Congress 2025

July 11, 2025 ยท 15:40โ€“16:10

Stage 9

MVI: Minimum Viable Interface for React Components

Daniel Espino Garcia

Software Design Engineer at Mattermost

Daniel Espino Garcia
Open session

World Congress 2025

July 11, 2025 ยท 13:00โ€“13:30

Stage 10

Modular Secrets to Lightning-Fast Android Builds

Mohamed Gamal

Mobile Staff Engineer at SumUp

Mohamed Gamal
Open session

World Congress 2025

July 10, 2025 ยท 10:50โ€“11:20

Stage 5

The Future of React: A Deep Dive into Its Compiler and Auto Optimization

Hammad Hassan

Software Engineer (I love things related to JS/TS and ML stack)

Hammad Hassan
Open session

World Congress 2025

July 10, 2025 ยท 15:30โ€“16:00

Stage 10

The Dependency Cookbook - Recipes for Micro Frontend success

Lucas Braeschke, Stefan Bley

Lucas Braeschke
Stefan Bley
All sessions at this congress