diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index a6be022ba252b489ff16615b9c3c1c2f7b150fdc..c9d5ae0b2953dd64ffd1c9c92341aa33f30650a5 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -223,7 +223,7 @@ module.exports = { // it's runtime that would otherwise processed through "file" loader. // Also exclude `html` and `json` extensions so they get processed // by webpacks internal loaders. - exclude: [/\.js$/, /\.html$/, /\.json$/], + exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/], loader: require.resolve('file-loader'), options: { name: 'static/media/[name].[hash:8].[ext]', diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 457a96728925338f52bab0e132d53016376db559..3b2a2068db28e9f2e83ac1df76652366e9407000 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -249,7 +249,7 @@ module.exports = { // it's runtime that would otherwise processed through "file" loader. // Also exclude `html` and `json` extensions so they get processed // by webpacks internal loaders. - exclude: [/\.js$/, /\.html$/, /\.json$/], + exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/], options: { name: 'static/media/[name].[hash:8].[ext]', },