Skip to content

Add migration note for developmentSourceSelf option#3185

Open
rootvector2 wants to merge 4 commits intobabel:mainfrom
rootvector2:docs/v8-migration-development-source-self
Open

Add migration note for developmentSourceSelf option#3185
rootvector2 wants to merge 4 commits intobabel:mainfrom
rootvector2:docs/v8-migration-development-source-self

Conversation

@rootvector2
Copy link

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

Adds a migration note for the new developmentSourceSelf option introduced in babel/babel#17845.

React 19.2 removed the source and self parameters from jsxDEV. Babel 8 no longer generates them by default in development mode. Users on older React versions can opt back in with developmentSourceSelf: true.

@netlify
Copy link

netlify bot commented Mar 2, 2026

👷 Deploy request for babel-next pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 689b779

@netlify
Copy link

netlify bot commented Mar 2, 2026

Deploy Preview for babel ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 689b779
🔍 Latest deploy log https://app.netlify.com/projects/babel/deploys/69ab37909a86560008c376fb
😎 Deploy Preview https://deploy-preview-3185--babel.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rootvector2
Copy link
Author

@JLHwung Done

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Mar 2, 2026

Thank you! Could you also add it to https://github.com/babel/website/blob/main/docs/plugin-transform-react-jsx-development.md#options and https://github.com/babel/website/blob/main/docs/preset-react.md#options? It should be gated by :::babel8 ... :::, see other examples in those files.


Set this to `true` if you are using a React version older than 19.2 or a custom JSX runtime that depends on these arguments.

:::
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you move this section to ./plugin-transform-react-jsx.md? Like the docs said, the option of jsx-development and jsx are shared so we don't put option docs here.

Copy link
Author

Choose a reason for hiding this comment

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

is it correct ?

Copy link
Contributor

@JLHwung JLHwung Mar 3, 2026

Choose a reason for hiding this comment

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

The current implementation allows the developmentSourceSelf in both plugin-transform-react-jsx and plugin-transform-react-jsx-development. But the plugin-transform-react-jsx does not accept development: boolean option, thus the developmentSourceSelf option seems redundant for plugin-transform-react-jsx.

If we can have the implementation only accepts developmentSourceSelf in the development plugin, then I think you are right, the option docs should stay here, preferably above to the "see options in" sentence since this is an option available only in plugin-transform-react-jsx-development.

Sorry about the confusion here. I previously thought development was accepted in plugin-transform-react-jsx and it turns out I am wrong. To summarize, the action items are

Per JLHwung's review, the developmentSourceSelf option is only accepted
by the development plugin, not the main plugin-transform-react-jsx.
Move the option docs to plugin-transform-react-jsx-development.md,
above the 'see options in' sentence.
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.

@babel/plugin-transform-react-jsx-development still generates source and self arguments for jsxDEV, which were removed in React 19.2

3 participants