Skip to content

Set babelrc to false by default#17912

Open
liuxingbaoyu wants to merge 2 commits intobabel:mainfrom
liuxingbaoyu:babelrc
Open

Set babelrc to false by default#17912
liuxingbaoyu wants to merge 2 commits intobabel:mainfrom
liuxingbaoyu:babelrc

Conversation

@liuxingbaoyu
Copy link
Copy Markdown
Member

@liuxingbaoyu liuxingbaoyu commented Mar 28, 2026

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

It still defaults to true in @babel/{cli,register,node}.
This might be a bit late, perhaps it should be postponed until Babel 9.

@liuxingbaoyu liuxingbaoyu changed the title Set babelrc to false by default. Set babelrc to false by default Mar 28, 2026
@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Mar 28, 2026

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 28, 2026

Open in StackBlitz

commit: c99ed0c

@nicolo-ribaudo
Copy link
Copy Markdown
Member

I love this, but it's a big breaking change and yeah I lean towards postponing at this point :/

@nicolo-ribaudo
Copy link
Copy Markdown
Member

Maybe we can add a warning though? "You are using .babelrc without a root babel.config.json file. This will break in the future."

@JLHwung
Copy link
Copy Markdown
Contributor

JLHwung commented Mar 28, 2026

I love this, but it's a big breaking change and yeah I lean towards postponing at this point :/

Me, too. We can probably introduce it behind the BABEL_9_BREAKING flag, but we could start deprecating .babelrc from Babel 8.

Aside: we also support package.json#babel and treat it as if it were a .babelrc file, we should probably deprecate that part as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants