Skip to content

Fallback to assuming ESM support with modules: auto#18069

Merged
nicolo-ribaudo merged 5 commits into
babel:mainfrom
nicolo-ribaudo:env-modules-auto-fallback-true
Jun 16, 2026
Merged

Fallback to assuming ESM support with modules: auto#18069
nicolo-ribaudo merged 5 commits into
babel:mainfrom
nicolo-ribaudo:env-modules-auto-fallback-true

Conversation

@nicolo-ribaudo

@nicolo-ribaudo nicolo-ribaudo commented Jun 14, 2026

Copy link
Copy Markdown
Member
Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link babel/website#3211
Any Dependency Changes?
License MIT

In #17670 we bumped the TODO comment to do this from Babel 8 to Babel 9, however I really think there is no good reason to keep defaulting to CommonJS nowdays.

Note that for @babel/register, @babel/node, and @babel/cli's REPL we still mark through the caller that ESM is not supported, as those packages don't support it yet (and we can probably add support for it during the Babel 8 release timeline).

I noticed this while writing the Babel 8.0.0 release blog post.

@nicolo-ribaudo nicolo-ribaudo added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release Priority: High pkg: preset-env labels Jun 14, 2026
@babel-bot

babel-bot commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 310153f

@JLHwung JLHwung 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.

The change looks good to me.

@nicolo-ribaudo nicolo-ribaudo merged commit 004f4b4 into babel:main Jun 16, 2026
103 of 104 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the env-modules-auto-fallback-true branch June 16, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: preset-env PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release Priority: High

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants