From 849e68ece22466a3c5971112f92289b37a86ced3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 17 May 2021 15:42:12 +0200 Subject: [PATCH] Optimizing build time + inline small files into CSS --- front/webpack.config.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/front/webpack.config.ts b/front/webpack.config.ts index 3521103b..e939f0ba 100644 --- a/front/webpack.config.ts +++ b/front/webpack.config.ts @@ -39,25 +39,27 @@ module.exports = { }, { test: /\.scss$/, + exclude: /node_modules/, use: [ MiniCssExtractPlugin.loader, { loader: 'css-loader', - /*options: { - url: false, + options: { + //url: false, sourceMap: true - }*/ + } }, 'sass-loader'], }, { test: /\.css$/, + exclude: /node_modules/, use: [ MiniCssExtractPlugin.loader, { loader: 'css-loader', - /*options: { - url: false, + options: { + //url: false, sourceMap: true - }*/ + } } ] }, @@ -95,8 +97,9 @@ module.exports = { } }, { - test: /\.(ttf|eot|svg|png|gif|jpg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, - type: 'asset/resource' + test: /\.(ttf|eot|svg|png|gif|jpg)$/, + exclude: /node_modules/, + type: 'asset' } ], }, @@ -164,6 +167,6 @@ module.exports = { assets: true, entrypoints: false, errorDetails: false, - } + }, } as Configuration & WebpackDevServer.Configuration;