Add migration note for developmentSourceSelf option#3185
Add migration note for developmentSourceSelf option#3185rootvector2 wants to merge 4 commits intobabel:mainfrom
Conversation
👷 Deploy request for babel-next pending review.Visit the deploys page to approve it
|
✅ Deploy Preview for babel ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@JLHwung Done |
|
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 |
|
|
||
| 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. | ||
|
|
||
| ::: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
- revert the last commit and updates the ordering a bit
- adjust Added developmentSourceSelfoption to gatesource/self in jsxDEV babel#17845 such that only the
developmentplugin accepts thedevelopmentSourceSelfoption. This should not affectpreset-reactanyway.
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.
Adds a migration note for the new
developmentSourceSelfoption introduced in babel/babel#17845.React 19.2 removed the
sourceandselfparameters fromjsxDEV. Babel 8 no longer generates them by default in development mode. Users on older React versions can opt back in withdevelopmentSourceSelf: true.