-
Notifications
You must be signed in to change notification settings - Fork 0
/
razzle.config.js
51 lines (44 loc) · 1.06 KB
/
razzle.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
48
49
50
51
/* eslint no-unused-vars: 0 */
/* eslint no-param-reassign: 0 */
const scss = /\.(scss|sass)$/;
const scss_module = /\.module\.(scss|sass)$/;
const image = /\.(gif|png|jpe?g|svg)$/;
const js = /\.(js|mjs|jsx)$/;
module.exports = {
modify: (config, { target, dev }, webpack) => {
// const MyCssConfig = {
// rules: [
// {
// test: style,
// use: ['style-loader','css-loader']
// }
// ]
// };
//
// const MySassConfig = {
// rules: [
// {
// test: scss,
// use: [
// 'style-loader',
// 'css-loader',
// 'sass-loader'
// ]
// },
// ]
// };
//
// config.module.rules.push(MyCssConfig);
// config.module.rules.push(MySassConfig);
// Make whatever fine-grained changes you need
if (!dev) {
config.devtool = undefined;
}
config.module.rules.push({
test: scss,
use: ['style-loader', 'css-loader', 'sass-loader'],
exclude: scss_module,
});
return config;
},
};