Skip to content

fix: Use runtime: 'classic' in the browser for React#18086

Merged
JLHwung merged 1 commit into
babel:mainfrom
liuxingbaoyu:fix-standalone-jsx
Jun 19, 2026
Merged

fix: Use runtime: 'classic' in the browser for React#18086
JLHwung merged 1 commit into
babel:mainfrom
liuxingbaoyu:fix-standalone-jsx

Conversation

@liuxingbaoyu

Copy link
Copy Markdown
Member
Q                       A
Fixed Issues? Fixes #18085
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass?
Documentation PR Link
Any Dependency Changes?
License MIT

@liuxingbaoyu liuxingbaoyu changed the title fix: Using runtime: 'classic' in the browser for React fix: Use runtime: 'classic' in the browser for React Jun 19, 2026
@babel-bot

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/61808

@liuxingbaoyu liuxingbaoyu added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: standalone area: react i: regression labels Jun 19, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: a57daa5

if (script.type === "module") {
presets = [
"react",
["react", { runtime: "classic" }],

@JLHwung JLHwung Jun 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably revisit this in the future.

React 19 is no longer shipping UMD (react/react#28735) and if in the future React releases an ESM build, we should figure out how to make babel-standalone work with it.

@JLHwung JLHwung merged commit 6609699 into babel:main Jun 19, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: react i: regression pkg: standalone PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@babel/standalone 8.0.2 fails to load/run via <script> tag (classic and module)

4 participants