Skip to content
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

Merged

Conversation

@WebPraktikos
Copy link
Contributor

WebPraktikos commented Dec 9, 2019

Change @babel/transform-react-jsx to @babel/plugin-transform-react-jsx

Plugin URL: https://babeljs.io/docs/en/babel-plugin-transform-react-jsx/

@babel/transform-react-jsx to @babel/plugin-transform-react-jsx
@aduth
aduth approved these changes Dec 9, 2019
Copy link
Member

aduth left a comment

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',

This comment has been minimized.

Copy link
@aduth

aduth Dec 9, 2019

Member

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.

@aduth aduth merged commit 38b4ca1 into WordPress:master Dec 9, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.