From c096b886af1dc6d2c274329e191ff54bdb196370 Mon Sep 17 00:00:00 2001 From: Jean-Michel FRANCOIS Date: Tue, 27 Aug 2024 17:13:51 +0200 Subject: [PATCH] fix: try to add the config to go back on 6.x behavior --- packages/theme/webpack.config.js | 3 +++ .../config/webpack.config.common.js | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/packages/theme/webpack.config.js b/packages/theme/webpack.config.js index ee07455afb..b43533b890 100644 --- a/packages/theme/webpack.config.js +++ b/packages/theme/webpack.config.js @@ -45,6 +45,9 @@ module.exports = (env, argv) => { options: { importLoaders: 3, sourceMap: true, + modules: { + namedExport: false, + }, }, }, { diff --git a/tools/scripts-config-react-webpack/config/webpack.config.common.js b/tools/scripts-config-react-webpack/config/webpack.config.common.js index 09dcdc4599..664800780c 100644 --- a/tools/scripts-config-react-webpack/config/webpack.config.common.js +++ b/tools/scripts-config-react-webpack/config/webpack.config.common.js @@ -29,11 +29,15 @@ function getCommonStyleLoaders(enableModules, isEnvDevelopmentServe) { const sourceMap = true; let cssOptions = { sourceMap, + modules: { + namedExport: false, + }, }; if (enableModules) { cssOptions = { sourceMap, modules: { + namedExport: false, localIdentName: '[name]__[local]___[hash:base64:5]', }, importLoaders: 1,