-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdev-build.config.js
47 lines (45 loc) · 1.73 KB
/
dev-build.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// This file is used to configure Webpack for dev builds, similar to production builds, without code minimization.
const {merge} = require('webpack-merge');
const baseConfig = require('./dev.config.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = merge(baseConfig, {
module: {
rules: [
{
test: /\.s?[ac]ss$/i,
use: [
// Creates `style` nodes from JS strings
MiniCssExtractPlugin.loader,
// Translates CSS into CommonJS
{
loader: 'css-loader',
options: {
sourceMap: false
}
},
// Compiles Sass to CSS
{
loader: 'sass-loader',
options: {
sourceMap: false,
// https://github.com/webpack-contrib/sass-loader#sassoptions
sassOptions: {
// If set to true, Sass won’t print warnings that are caused by dependencies (like Bootstrap):
// https://sass-lang.com/documentation/js-api/interfaces/options/#quietDeps
quietDeps: true,
silenceDeprecations: ['import', 'global-builtin']
}
}
}
]
}
]
},
plugins: [
new MiniCssExtractPlugin({
filename: '[name]/bundle.css',
chunkFilename: '[id].css'
})
],
mode: 'development'
});