From 3f1bbb0c8a158b1dead8f0aa8ceae6d0dfae9918 Mon Sep 17 00:00:00 2001 From: Mikyung Kim Date: Thu, 5 Dec 2024 09:27:06 +0900 Subject: [PATCH 1/2] WRR-8543: Changed CSS classname to be hash based when production build Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com) --- config/webpack.config.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/config/webpack.config.js b/config/webpack.config.js index 5f379b8d..70df2c8d 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -335,7 +335,7 @@ module.exports = function ( use: getStyleLoaders({ importLoaders: 1, modules: { - getLocalIdent + ...(isEnvProduction ? {} : {getLocalIdent}) } }) }, @@ -346,7 +346,8 @@ module.exports = function ( use: getStyleLoaders({ importLoaders: 1, modules: { - ...(app.forceCSSModules ? {getLocalIdent} : {mode: 'icss'}) + ...(app.forceCSSModules ? {} : {mode: 'icss'}), + ...(!app.forceCSSModules && isEnvProduction ? {} : {getLocalIdent}) } }), // Don't consider CSS imports dead code even if the @@ -360,7 +361,7 @@ module.exports = function ( use: getLessStyleLoaders({ importLoaders: 2, modules: { - getLocalIdent + ...(isEnvProduction ? {} : {getLocalIdent}) } }) }, @@ -369,7 +370,8 @@ module.exports = function ( use: getLessStyleLoaders({ importLoaders: 2, modules: { - ...(app.forceCSSModules ? {getLocalIdent} : {mode: 'icss'}) + ...(app.forceCSSModules ? {} : {mode: 'icss'}), + ...(!app.forceCSSModules && isEnvProduction ? {} : {getLocalIdent}) } }), sideEffects: true @@ -381,7 +383,7 @@ module.exports = function ( use: getScssStyleLoaders({ importLoaders: 3, modules: { - getLocalIdent + ...(isEnvProduction ? {} : {getLocalIdent}) } }) }, @@ -391,7 +393,8 @@ module.exports = function ( use: getScssStyleLoaders({ importLoaders: 3, modules: { - ...(app.forceCSSModules ? {getLocalIdent} : {mode: 'icss'}) + ...(app.forceCSSModules ? {} : {mode: 'icss'}), + ...(!app.forceCSSModules && isEnvProduction ? {} : {getLocalIdent}) } }) }, From b2a887820519a424f6374845809830c8fb566b78 Mon Sep 17 00:00:00 2001 From: Mikyung Kim Date: Thu, 5 Dec 2024 11:01:19 +0900 Subject: [PATCH 2/2] Added a changelog Enact-DCO-1.0-Signed-off-by: Mikyung Kim (mikyung27.kim@lge.com) --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc16a98c..757ae83e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## unreleased + +### pack + +* Changed classnames to be hashed when production build. + ## 7.0.0-alpha.1 (July 24, 2024) * Updated the minimum version of Node to `18.12.0`.