Skip to content

[babel 8] Remove useSpread and useBuiltIns jsx options#12593

Merged
nicolo-ribaudo merged 2 commits into
babel:mainfrom
nicolo-ribaudo:breaking/remove-useSpread-useBuildIns
Jan 8, 2021
Merged

[babel 8] Remove useSpread and useBuiltIns jsx options#12593
nicolo-ribaudo merged 2 commits into
babel:mainfrom
nicolo-ribaudo:breaking/remove-useSpread-useBuildIns

Conversation

@nicolo-ribaudo

@nicolo-ribaudo nicolo-ribaudo commented Jan 7, 2021

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

backport of 8cc8696 (#11141)

backport of 8cc8696

Co-authored-by: Nicolò Ribaudo <[email protected]>
Co-authored-by: Brian Ng <[email protected]>
@babel-bot

babel-bot commented Jan 7, 2021

Copy link
Copy Markdown
Collaborator

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

@codesandbox-ci

codesandbox-ci Bot commented Jan 7, 2021

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bf0335b:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

throw new Error(
"transform-react-jsx currently only accepts a boolean option for " +
"useSpread (defaults to false)",
'@babel/plugin-transform-react-jsx: Since Babel 8, an inline object with spread elements is always used, and the "useSpread" option is no longer available. Please remove it from your config.',

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.

Do we want a similar config message as useBuiltIns here if they want to compile?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@babel/preset-env already compiles spread by default. We need the message for useBuiltIns because by default ... is not compiled to Object.assign.

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.

Oh ok great!

@nicolo-ribaudo
nicolo-ribaudo merged commit fce3e71 into babel:main Jan 8, 2021
@nicolo-ribaudo
nicolo-ribaudo deleted the breaking/remove-useSpread-useBuildIns branch January 8, 2021 17:16
@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 Apr 10, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 10, 2021
@nicolo-ribaudo nicolo-ribaudo added babel 8 PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release and removed babel-8-dev → main babel 8 labels Aug 8, 2023
@JLHwung JLHwung added this to the v8.0.0 milestone Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Add option to preset-react / transform-react-jsx to output object spread syntax

4 participants