Skip to content

feat(standalone): export async transform - #17653

Merged
nicolo-ribaudo merged 1 commit into
babel:mainfrom
JLHwung:export-async-transform-standalone
Jan 27, 2026
Merged

nicolo-ribaudo merged 1 commit into
babel:mainfrom
JLHwung:export-async-transform-standalone

Conversation

@JLHwung

@JLHwung JLHwung commented Dec 11, 2025

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

@JLHwung JLHwung added PR: New Feature 馃殌 A type of pull request used for our changelog categories pkg: standalone labels Dec 11, 2025
@babel-bot

Copy link
Copy Markdown
Collaborator

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

@pkg-pr-new

pkg-pr-new Bot commented Dec 11, 2025

Copy link
Copy Markdown

Open in StackBlitz

commit: 0fe6614

@NullVoxPopuli NullVoxPopuli left a comment

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.

<3 馃帀

@NullVoxPopuli

Copy link
Copy Markdown
Contributor

I tested this locally in my project and it works great <3

@liuxingbaoyu

Copy link
Copy Markdown
Member

FYI, you can use this. :)
npm i https://pkg.pr.new/babel/babel/@babel/standalone@0fe661460049cbc4f2b96fdeb0d6ce17b89b3bef

@nicolo-ribaudo nicolo-ribaudo added PR: New Feature (next major) 馃殌 A type of pull request used for our changelog categories for next major release and removed PR: New Feature 馃殌 A type of pull request used for our changelog categories labels Dec 19, 2025
@NullVoxPopuli

Copy link
Copy Markdown
Contributor

Is main only for the next major?

I'm looking forward to this feature so my users can use newer plugins

@nicolo-ribaudo

Copy link
Copy Markdown
Member

Backport for v7 is in #17663.

@nicolo-ribaudo
nicolo-ribaudo merged commit fba9608 into babel:main Jan 27, 2026
54 checks passed
@nicolo-ribaudo
nicolo-ribaudo deleted the export-async-transform-standalone branch January 27, 2026 16:12
@nicolo-ribaudo nicolo-ribaudo added the PR: New Feature 馃殌 A type of pull request used for our changelog categories label Mar 7, 2026
NullVoxPopuli-ai-agent pushed a commit to NullVoxPopuli/limber that referenced this pull request Sep 17, 2026
The compilers of repl-sdk use two things from Babel: the
`transform-typescript` plugin and the `react` preset. `@babel/standalone`
has every plugin and preset, the unicode tables for regex transforms
(641 kB), and the data of preset-env.

`packages/babel-8-lite` is a private package, not published. It bundles
`@babel/core` 8 with only those two parts into one browser-ready file,
in the shape of `@babel/standalone`. Its own build replaces what Babel 8
needs from node: `node:path`, `node:assert` (Babel calls only
`assert()` and `assert.fail()`), and the `process` global. So the
packages that bundle it need no configuration for it.

ember-repl has it as a dev dependency, so rollup bundles it as its own
chunk. The build of ember-repl stays on Babel 7, and ember-repl needs
no `@babel/core` peer. In the repl app the Babel chunk goes from
2796 kB to 1143 kB, and from 453 kB to 241 kB compressed.

The import map key is `@glimdown/babel-8-lite`, because this is not
`@babel/standalone`. repl-sdk asks for that name. A host that does not
provide it gets `@babel/standalone@8` from esm.sh, which has the same
API.

`transform` is `transformSync`, as in `@babel/standalone`. In
`@babel/core` 8, `transform` needs a callback, and the react compiler
calls it synchronously.

The tarball existed for `transformAsync` (babel/babel#17653), which is
in Babel 8. The root package and the browser tests of repl-sdk now use
`@babel/standalone` 8 from npm.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: standalone PR: New Feature (next major) 馃殌 A type of pull request used for our changelog categories for next major release PR: New Feature 馃殌 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 is missing the async APIs, such as transformAsync

5 participants