> Markdown version of [/events/world-congress-2025/sessions/722-a-practical-guide-to](https://www.wearedevelopers.com/events/world-congress-2025/sessions/722-a-practical-guide-to). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # A Practical Guide to Reducing Bundle Size - **Date:** Friday, Jul 11, 2025 - **Time:** 09:00–09:30 (30 min) - **Room:** Stage 10 - **Event:** World Congress 2025 - **Tags:** javascript, performance, typescript ## Recording [Watch recording](https://www.wearedevelopers.com/videos/1439-a-practical-guide-to-reducing-bundle-size) ## Description 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. ## Speaker ### [Stephen Cooper](https://www.wearedevelopers.com/@stephen-cooper) Senior Developer at AG Grid ## Related talks at this congress - [MVI: Minimum Viable Interface for React Components](https://www.wearedevelopers.com/events/world-congress-2025/sessions/909-mvi-minimum-viable) — Daniel Espino Garcia - [Modular Secrets to Lightning-Fast Android Builds](https://www.wearedevelopers.com/events/world-congress-2025/sessions/834-modular-secrets-to) — Mohamed Gamal - [The Future of React: A Deep Dive into Its Compiler and Auto Optimization](https://www.wearedevelopers.com/events/world-congress-2025/sessions/519-the-future-of-react) — Hammad Hassan - [The Dependency Cookbook - Recipes for Micro Frontend success](https://www.wearedevelopers.com/events/world-congress-2025/sessions/645-the-dependency) — Lucas Braeschke, Stefan Bley