From 6af2a0355a5cf3f93c8a2dd96f673e7bd3652374 Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Tue, 3 Oct 2023 14:02:28 +0300 Subject: [PATCH 1/3] (feat) Add module loaders for CSS files to the styleguide webpack config --- packages/framework/esm-styleguide/webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/framework/esm-styleguide/webpack.config.js b/packages/framework/esm-styleguide/webpack.config.js index e26b9e3fd..da2940a93 100644 --- a/packages/framework/esm-styleguide/webpack.config.js +++ b/packages/framework/esm-styleguide/webpack.config.js @@ -21,6 +21,10 @@ module.exports = (env) => ({ devtool: "source-map", module: { rules: [ + { + test: /\.css$/, + use: ["style-loader", "css-loader"], + }, { test: /\.s?[ac]ss$/i, use: [ From b3d26feaf6c403277f5046127863b9af59fd75ec Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Tue, 3 Oct 2023 15:10:09 +0300 Subject: [PATCH 2/3] Remove style-loader and update sass-loader glob pattern --- packages/framework/esm-styleguide/webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/framework/esm-styleguide/webpack.config.js b/packages/framework/esm-styleguide/webpack.config.js index da2940a93..52f1d5b62 100644 --- a/packages/framework/esm-styleguide/webpack.config.js +++ b/packages/framework/esm-styleguide/webpack.config.js @@ -23,10 +23,10 @@ module.exports = (env) => ({ rules: [ { test: /\.css$/, - use: ["style-loader", "css-loader"], + use: ["css-loader"], }, { - test: /\.s?[ac]ss$/i, + test: /\.s[ac]ss$/i, use: [ { loader: MiniCssExtractPlugin.loader }, "css-loader", From 4fa594e1015ca5846cac66cdbee287c303f373ac Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Tue, 3 Oct 2023 15:16:04 +0300 Subject: [PATCH 3/3] Review feedback --- packages/framework/esm-styleguide/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/esm-styleguide/webpack.config.js b/packages/framework/esm-styleguide/webpack.config.js index 52f1d5b62..58188b425 100644 --- a/packages/framework/esm-styleguide/webpack.config.js +++ b/packages/framework/esm-styleguide/webpack.config.js @@ -23,7 +23,7 @@ module.exports = (env) => ({ rules: [ { test: /\.css$/, - use: ["css-loader"], + use: [{ loader: MiniCssExtractPlugin.loader }, "css-loader"], }, { test: /\.s[ac]ss$/i,