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
merged 1 commit into from Dec 9, 2019
Merged

docs: Correct babel plugin name #19022

merged 1 commit into from Dec 9, 2019

Conversation

WebPraktikos
Copy link
Contributor

@WebPraktikos 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
@gziolo gziolo requested a review from aduth December 9, 2019 20:30
@gziolo gziolo added [Package] Babel plugin import JSX pragma /packages/babel-plugin-import-jsx-pragma [Type] Developer Documentation Documentation for developers labels Dec 9, 2019
Copy link
Member

@aduth aduth left a 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',
Copy link
Member

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.

@aduth aduth merged commit 38b4ca1 into WordPress:master Dec 9, 2019
@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
Labels
[Package] Babel plugin import JSX pragma /packages/babel-plugin-import-jsx-pragma [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants