New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Correct babel plugin name #19022
docs: Correct babel plugin name #19022
Conversation
@babel/transform-react-jsx to @babel/plugin-transform-react-jsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvement!
```js | ||
// .babelrc.js | ||
module.exports = { | ||
plugins: [ | ||
'@wordpress/babel-plugin-import-jsx-pragma', | ||
'@babel/transform-react-jsx', | ||
'@babel/plugin-transform-react-jsx', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't checked to confirm, but I think that when specifying a plugin, it is optional to include the "plugin-" prefix.
https://babeljs.io/docs/en/options#name-normalization
I don't think it hurts to be more explicit here, though. So I'm fine with this change.
Change @babel/transform-react-jsx to @babel/plugin-transform-react-jsx
Plugin URL: https://babeljs.io/docs/en/babel-plugin-transform-react-jsx/