diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index e465d8e7a00..18126dd4bf6 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -594,7 +594,12 @@ module.exports = function (webpackEnv) { // its runtime that would otherwise be processed through "file" loader. // Also exclude `html` and `json` extensions so they get processed // by webpacks internal loaders. - exclude: [/^$/, /\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/], + exclude: [ + /^$/, + /\.(js|mjs|jsx|ts|tsx|cjs)$/, + /\.html$/, + /\.json$/, + ], type: 'asset/resource', }, // ** STOP ** Are you adding a new loader?