From 477a84f67e407690a1862d2dd95c4b229b6571ed Mon Sep 17 00:00:00 2001 From: amphineko Date: Sat, 21 Mar 2020 08:10:08 +0800 Subject: [PATCH] remove annoying sass workflow --- webpack.config.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 1a04529..e515cfc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -19,17 +19,10 @@ module.exports = { module: { rules: [ { - test: /\.(jpg|png|svg)$/, + test: /\.(eot|jpg|png|svg|ttf|woff2?)$/, loader: 'file-loader', options: { - name: 'assets/images/[name].[contenthash:8].[ext]' - } - }, - { - test: /\.(eot|svg|ttf|woff2?)$/, - loader: 'file-loader', - options: { - name: 'assets/webfonts/[name].[contenthash:8].[ext]' + name: 'assets/[name].[contenthash:8].[ext]' } }, { @@ -39,11 +32,15 @@ module.exports = { 'extract-loader', { loader: 'css-loader', - options: { - importLoaders: 1, - }, + options: { sourceMap: true } }, - 'sass-loader', + { + loader: 'resolve-url-loader', + options: { + engine: 'postcss', + sourceMap: true + } + } ], }, ],