diff --git a/packages/wp-build/CHANGELOG.md b/packages/wp-build/CHANGELOG.md index 30aaec0c61932d..6e08d98f9a2607 100644 --- a/packages/wp-build/CHANGELOG.md +++ b/packages/wp-build/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- `@wordpress/build` no longer parses JSX syntax in `.js` source files. Rename these files to `.jsx` or `.tsx` before building ([#82189](https://github.com/WordPress/gutenberg/pull/82189)). + ### Enhancements - Target `@wordpress/browserslist-config` for JavaScript and CSS when the project has no Browserslist config, instead of Browserslist's implicit defaults ([#82179](https://github.com/WordPress/gutenberg/pull/82179)). diff --git a/packages/wp-build/lib/build.mjs b/packages/wp-build/lib/build.mjs index e7c77f50625628..baefec0773e8ce 100755 --- a/packages/wp-build/lib/build.mjs +++ b/packages/wp-build/lib/build.mjs @@ -1489,7 +1489,6 @@ async function transpilePackage( packageName ) { target, jsx: 'automatic', jsxImportSource: 'react', - loader: { '.js': 'jsx' }, plugins, } ) ); @@ -1523,7 +1522,6 @@ async function transpilePackage( packageName ) { target, jsx: 'automatic', jsxImportSource: 'react', - loader: { '.js': 'jsx' }, plugins, } ) ); diff --git a/packages/wp-build/lib/worker-build.mjs b/packages/wp-build/lib/worker-build.mjs index 9f771e30b8084a..a820a11525bc52 100644 --- a/packages/wp-build/lib/worker-build.mjs +++ b/packages/wp-build/lib/worker-build.mjs @@ -333,7 +333,6 @@ export const workerCode = ${ JSON.stringify( workerContent ) }; target, jsx: 'automatic', jsxImportSource: 'react', - loader: { '.js': 'jsx' }, plugins, } ) ); @@ -356,7 +355,6 @@ export const workerCode = ${ JSON.stringify( workerContent ) }; target, jsx: 'automatic', jsxImportSource: 'react', - loader: { '.js': 'jsx' }, plugins, } ) );