-
Notifications
You must be signed in to change notification settings - Fork 11
/
.sweetrc.js
47 lines (45 loc) · 1.06 KB
/
.sweetrc.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
import path from 'path';
import process from 'process';
const isDevelopment: boolean = process.env.NODE_ENV === 'development';
export default {
frame: 'vue',
dll: [
'vue/dist/vue',
'vue-router/dist/vue-router',
'vuex/dist/vuex'
],
entry: {
app: [path.join(__dirname, 'src/app.js')]
},
rules: [
{
test: /(dll\.js|gt\.min\.js)/,
use: [{
loader: 'file-loader',
options: {
name: isDevelopment ? '[name].[ext]' : '[hash:5].[ext]',
outputPath: 'script/'
}
}]
}
],
js: {
ecmascript: true,
plugins: [['import', { libraryName: 'iview', libraryDirectory: 'src/components' }]],
exclude: /(dll\.js|gt\.min\.js|node_modules)/
},
sass: {
include: /src/,
publicPath: '../'
},
css: {
modules: false,
modifyVars: {
// https://github.com/iview/iview/blob/3.x/src/styles/custom.less
'@primary-color': '#9254de'
},
include: /node_modules[\\/]_?iview/,
publicPath: '../'
},
html: [{ template: path.join(__dirname, 'src/index.pug') }]
};