From ee5a12790c9738da1b842b188ecdf52bfacd5153 Mon Sep 17 00:00:00 2001 From: Jean-Michel FRANCOIS Date: Wed, 28 Aug 2024 12:03:06 +0200 Subject: [PATCH] fix: add as-is to the webpack config --- packages/icons/webpack.config.js | 1 + packages/theme/webpack.config.js | 1 + .../config/webpack.config.common.js | 2 ++ 3 files changed, 4 insertions(+) diff --git a/packages/icons/webpack.config.js b/packages/icons/webpack.config.js index 8c8db3e341..01d8996e7c 100644 --- a/packages/icons/webpack.config.js +++ b/packages/icons/webpack.config.js @@ -39,6 +39,7 @@ module.exports = { url: false, modules: { namedExport: false, + exportLocalsConvention: 'as-is', }, }, }, diff --git a/packages/theme/webpack.config.js b/packages/theme/webpack.config.js index b43533b890..ea382f0335 100644 --- a/packages/theme/webpack.config.js +++ b/packages/theme/webpack.config.js @@ -47,6 +47,7 @@ module.exports = (env, argv) => { sourceMap: true, modules: { namedExport: false, + exportLocalsConvention: 'as-is', }, }, }, 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 664800780c..18c04eb045 100644 --- a/tools/scripts-config-react-webpack/config/webpack.config.common.js +++ b/tools/scripts-config-react-webpack/config/webpack.config.common.js @@ -31,6 +31,7 @@ function getCommonStyleLoaders(enableModules, isEnvDevelopmentServe) { sourceMap, modules: { namedExport: false, + exportLocalsConvention: 'as-is', }, }; if (enableModules) { @@ -38,6 +39,7 @@ function getCommonStyleLoaders(enableModules, isEnvDevelopmentServe) { sourceMap, modules: { namedExport: false, + exportLocalsConvention: 'as-is', localIdentName: '[name]__[local]___[hash:base64:5]', }, importLoaders: 1,