forked from jinkin1995/vue-json-edit
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.base.config.js
46 lines (46 loc) · 1.21 KB
/
webpack.base.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
module.exports = {
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
// Since sass-loader (weirdly) has SCSS as its default parse mode, we map
// the "scss" and "sass" values for the lang attribute to the right configs here.
// other preprocessors should work out of the box, no loader config like this necessary.
scss: 'vue-style-loader!css-loader!sass-loader',
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax',
},
// other vue-loader options go here
},
},
{
test: /\.css$/,
loader: 'style-loader!css-loader',
},
{
test: /\.(png|jpg|gif|webp)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]',
},
},
{
test: /\.svg/,
loader: 'url-loader',
}, {
test: /\.(woff2?|woff|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
name: '[name].[ext]?[hash]'
}
}
],
},
};