Skip to content

Commit be38e1f

Browse files
authored
Merge pull request #255 from humanmade/update-babel-jsx-plugin
Replace Babel 6 JSX transform with @babel/plugin-transform-react-jsx
2 parents 450a210 + 3d42ecd commit be38e1f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

babel-preset.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ module.exports = ( api ) => {
22
api.cache.forever();
33

44
return {
5-
presets: [ '@wordpress/default' ],
5+
presets: [ '@wordpress/babel-preset-default' ],
66
plugins: [
77
'@babel/plugin-proposal-class-properties',
8-
[ 'transform-react-jsx', {
8+
[ '@babel/plugin-transform-react-jsx', {
99
pragma: 'wp.element.createElement',
1010
} ],
1111
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@babel/plugin-proposal-class-properties": "^7.18.6",
4949
"@wordpress/babel-preset-default": "^8.30.0",
5050
"babel-loader": "^10.0.0",
51-
"babel-plugin-transform-react-jsx": "^6.24.1",
51+
"@babel/plugin-transform-react-jsx": "^7.0.0",
5252
"bell-on-bundler-error-plugin": "^3.0.0",
5353
"block-editor-hmr": "^0.7.0",
5454
"chalk": "^5.6.0",

0 commit comments

Comments
 (0)