From e390e677f0b75a9f76c1fa72bd528bd03901a6bd Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 10 Aug 2023 07:52:49 -0400 Subject: [PATCH 1/2] (fix) Don't process CSS files with the Sass loader --- packages/shell/esm-app-shell/webpack.config.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/shell/esm-app-shell/webpack.config.js b/packages/shell/esm-app-shell/webpack.config.js index 24b1de1be..ab1e67333 100644 --- a/packages/shell/esm-app-shell/webpack.config.js +++ b/packages/shell/esm-app-shell/webpack.config.js @@ -216,7 +216,16 @@ module.exports = (env, argv = {}) => { module: { rules: [ { - test: /\.s?css$/, + test: /\.css$/, + use: [ + isProd + ? { loader: require.resolve(MiniCssExtractPlugin.loader) } + : { loader: require.resolve("style-loader") }, + { loader: require.resolve("css-loader") }, + ], + }, + { + test: /\.scss$/, use: [ isProd ? { loader: require.resolve(MiniCssExtractPlugin.loader) } From 59f999992151bb296b6f659e467a3f59b5d90160 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 10 Aug 2023 07:59:10 -0400 Subject: [PATCH 2/2] Minimize rule --- packages/shell/esm-app-shell/webpack.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/shell/esm-app-shell/webpack.config.js b/packages/shell/esm-app-shell/webpack.config.js index ab1e67333..c97a8d3ba 100644 --- a/packages/shell/esm-app-shell/webpack.config.js +++ b/packages/shell/esm-app-shell/webpack.config.js @@ -216,7 +216,7 @@ module.exports = (env, argv = {}) => { module: { rules: [ { - test: /\.css$/, + test: /openmrs-esm-styleguide\.css$/, use: [ isProd ? { loader: require.resolve(MiniCssExtractPlugin.loader) } @@ -225,7 +225,8 @@ module.exports = (env, argv = {}) => { ], }, { - test: /\.scss$/, + test: /\.s?css$/, + exclude: [/openmrs-esm-styleguide\.css$/], use: [ isProd ? { loader: require.resolve(MiniCssExtractPlugin.loader) }