Skip to content

fix: ensure targets.esmodules is validated#17770

Merged
JLHwung merged 1 commit intobabel:mainfrom
JLHwung:fix-17769
Feb 4, 2026
Merged

fix: ensure targets.esmodules is validated#17770
JLHwung merged 1 commit intobabel:mainfrom
JLHwung:fix-17769

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented Feb 2, 2026

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

The PR ensures that targets.esmodules is valid. The typing allows both boolean and intersect but the runtime validation said otherwise. I will fix the type discrepancies in another PR.

As is revealed in the new test case, the esmodules: true in standalone behaves exactly as esmodules: "intersect", I think this PR suffices to fix the regression.

@JLHwung JLHwung added the PR: Bug Fix (next major) 🐛 A type of pull request used for our changelog categories for next major release label Feb 2, 2026
@JLHwung JLHwung changed the title fix: ensure target.esmodules is validated fix: ensure targets.esmodules is validated Feb 2, 2026
@babel-bot
Copy link
Copy Markdown
Collaborator

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 2, 2026

Open in StackBlitz

commit: 11889f0

@JLHwung JLHwung merged commit ad74182 into babel:main Feb 4, 2026
55 checks passed
@JLHwung JLHwung deleted the fix-17769 branch February 4, 2026 14:38
@nicolo-ribaudo nicolo-ribaudo added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i: regression pkg: standalone PR: Bug Fix 🐛 A type of pull request used for our changelog categories PR: Bug Fix (next major) 🐛 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conflict between data-presets and data-targets

4 participants