diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 8efff0b96c7..11fc0962aeb 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -383,6 +383,7 @@ module.exports = function (webpackEnv) { limit: imageInlineSizeLimit, mimetype: 'image/avif', name: 'static/media/[name].[hash:8].[ext]', + esModule: false, }, }, // "url" loader works like "file" loader except that it embeds assets @@ -394,6 +395,7 @@ module.exports = function (webpackEnv) { options: { limit: imageInlineSizeLimit, name: 'static/media/[name].[hash:8].[ext]', + esModule: false, }, }, // Process application JS with Babel. @@ -586,6 +588,7 @@ module.exports = function (webpackEnv) { exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/], options: { name: 'static/media/[name].[hash:8].[ext]', + esModule: false, }, }, // ** STOP ** Are you adding a new loader?