World Congress 2025

A Practical Guide to Reducing Bundle Size

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

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.

performance javascript typescript

World Congress 2025

Related talks

Open session

MVI: Minimum Viable Interface for React Components

  • Daniel Espino Garcia

    Mattermost

    Senior Software Design Engineer

Open session

Modular Secrets to Lightning-Fast Android Builds

  • Mohamed Gamal

    SumUp

    Mobile Staff Engineer

Open session

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

  • Hammad Hassan

    sMOTIVE

    Software Engineer

Open session

The Dependency Cookbook - Recipes for Micro Frontend success

  • Lucas Braeschke

    ZEISS Digital Innovation

    Software Architect

  • Stefan Bley

    ZEISS Digital Innovation

    Software Architect

All sessions at this congress