Skip to content

[react] Make development option default to the configured env#16927

Merged
nicolo-ribaudo merged 2 commits into
babel:mainfrom
nicolo-ribaudo:preset-react-env
Dec 4, 2024
Merged

[react] Make development option default to the configured env#16927
nicolo-ribaudo merged 2 commits into
babel:mainfrom
nicolo-ribaudo:preset-react-env

Conversation

@nicolo-ribaudo

@nicolo-ribaudo nicolo-ribaudo commented Oct 23, 2024

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

Babel 7 defaults to false, while Babel 8 currently defaults to true. We should keep defaulting to false, unless somebody sets NODE_ENV (or BABEL_ENV) to development.

@nicolo-ribaudo nicolo-ribaudo added the PR: Bug Fix (next major) 🐛 A type of pull request used for our changelog categories for next major release label Oct 23, 2024
@nicolo-ribaudo nicolo-ribaudo changed the title Respect NODE_ENV/BABEL_ENV in preset-react [react] Only default to development when set through env Oct 23, 2024
@babel-bot

babel-bot commented Oct 23, 2024

Copy link
Copy Markdown
Collaborator

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

@JLHwung
JLHwung requested a review from liuxingbaoyu December 3, 2024 20:24

@liuxingbaoyu liuxingbaoyu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

CI failures are relevant.

@nicolo-ribaudo
nicolo-ribaudo merged commit 3ff1058 into babel:main Dec 4, 2024
@nicolo-ribaudo
nicolo-ribaudo deleted the preset-react-env branch December 4, 2024 11:19
@nicolo-ribaudo nicolo-ribaudo changed the title [react] Only default to development when set through env [react] Make development default to the configured env Dec 4, 2024
@nicolo-ribaudo nicolo-ribaudo changed the title [react] Make development default to the configured env [react] Make development option default to the configured env Dec 4, 2024
@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Mar 6, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue 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.

The default value of development in @babel/preset-react is unexpected.

4 participants