-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefaults.js
More file actions
76 lines (73 loc) · 1.69 KB
/
Copy pathdefaults.js
File metadata and controls
76 lines (73 loc) · 1.69 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* eslint-disable no-undef */
/**
* Function that returns default values.
* Used because Object.assign does a shallow instead of a deep copy.
* Using [].push will add to the base array, so a require will alter
* the base array output.
*/
'use strict';
const path = require('path');
const srcPath = path.join(__dirname, '/../src');
const dfltPort = 8001;
/**
* Get the default modules object for webpack
* @return {Object}
*/
function getDefaultModules() {
return {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.sass/,
use: ['style-loader', 'css-loader', {
loader: 'sass-loader',
options: {
api: 'modern-compiler',
sassOptions: {
outputStyle: 'expanded',
quietDeps: true,
silenceDeprecations: ['import']
}
}
}
]
},
{
test: /\.scss/,
use: ['style-loader', 'css-loader', {
loader: 'sass-loader',
options: {
api: 'modern-compiler',
sassOptions: {
outputStyle: 'expanded',
quietDeps: true,
silenceDeprecations: ['import']
}
}
}
]
},
{
test: /\.less/,
use: ['style-loader', 'css-loader', 'less-loader']
},
{
test: /\.styl/,
use: ['style-loader', 'css-loader', 'stylus-loader']
},
{
test: /\.(mp4|ogg|svg)$/,
type: 'asset/resource'
}
]
};
}
module.exports = {
srcPath: srcPath,
publicPath: '/assets/',
port: dfltPort,
getDefaultModules: getDefaultModules
};