Why React19 no longer supports UMD builds

Saurabh Mhatre
2 min readJan 15, 2025

--

Why React19 no longer supports UMD builds

When working with JavaScript modules, we often encounter two main formats: UMD (Universal Module Definition) and ESM (ECMAScript Modules).
Recently in React v19, UMD support was dropped in favour of ESM.
I was curious to know about why this change happened and what are this two formats exactly.
So if you have same question then let's deep dive further
UMD
UMD is a module format designed to work everywhere—whether in a browser, Node.js, or as a global script without any module loader.
It can run directly in the browser without any build tools.
Also it defines a global variable when no module system is detected.
It is ideal for legacy projects or when we need to support older environments that don’t natively support modules.

ESM
ESM is the official JavaScript module system introduced in ES6 (2015). It's now the standard for writing modular JavaScript.
It works natively in modern browsers and Node.js without additional tools.
It uses import and export statements for defining and using modules.
Supports tree shaking, which helps reduce bundle sizes by removing unused code.
It is ideal for modern web applications and tools using module bundlers (e.g., Webpack, Vite).

React 19 removed UMD builds to focus on modern ESM workflows, reducing the maintenance burden and bundle size using tree shaking and encouraging developers to adopt latest practices. For script tags, ESM-based CDNs like esm.sh are now recommended.

I hope this short post helped you in understanding the difference between the two and why UMD support was dropped in React v19.

That’s it from my end for today. See you all in the next post 👋

--

--

Saurabh Mhatre
Saurabh Mhatre

Written by Saurabh Mhatre

Senior Frontend Developer with 9+ years industry experience. Content creator on Youtube and Medium. LinkedIn/Twitter/Instagram: @SaurabhNative

Responses (1)