Last active
July 22, 2021 08:34
-
-
Save zgordon/e996a97384a09254f375bc0289b290c7 to your computer and use it in GitHub Desktop.
An example .babelrc file for working with Gutenberg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"presets": [ "@wordpress/default" ], | |
"plugins": [ | |
"transform-object-rest-spread", | |
[ | |
"transform-react-jsx", | |
{ | |
"pragma": "wp.element.createElement" | |
} | |
], | |
"transform-runtime", | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this the actual version now? Just simple:
and all the rest happens behind the scenes? Or do you need other Babel plugins too?
See more details at https://developer.wordpress.org/block-editor/reference-guides/packages/packages-babel-preset-default/ and https://github.com/WordPress/gutenberg/blob/HEAD/packages/babel-preset-default/index.js