From 3a4ee0af8e552ad5babb714de6ef92b3a9990639 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Tue, 5 Jan 2021 19:15:54 +0100 Subject: [PATCH] Scripts: Make it possible to transpile `.jsx` files with build command Closes #21009 based on the proposal from @cliffordp. --- packages/scripts/CHANGELOG.md | 1 + packages/scripts/config/webpack.config.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index f10c4f721b93d..19df8a9f79760 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -13,6 +13,7 @@ - `wordpress` subfolder is no longer ignored when detecting files for testing, linting or formatting. - The bundled `eslint` dependency has been updated from requiring `^7.1.0` to requiring `^7.17.0` ([#27965](https://github.com/WordPress/gutenberg/pull/27965)). +- Make it possible to transpile `.jsx` files with `build` and `start` commands ([#28002](https://github.com/WordPress/gutenberg/pull/28002)). ### Internal diff --git a/packages/scripts/config/webpack.config.js b/packages/scripts/config/webpack.config.js index 190bf16f3c583..dfb3bd35d17bc 100644 --- a/packages/scripts/config/webpack.config.js +++ b/packages/scripts/config/webpack.config.js @@ -129,7 +129,7 @@ const config = { module: { rules: [ { - test: /\.js$/, + test: /\.jsx?$/, exclude: /node_modules/, use: [ require.resolve( 'thread-loader' ),