-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue.config.js
46 lines (42 loc) · 912 Bytes
/
vue.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
const vueConfig = {}
vueConfig.lintOnSave = 'warning'
if (process.env.NODE_ENV === 'production') {
vueConfig.configureWebpack = {
devtool: false,
externals: [
{
moment: {
commonjs: 'moment',
commonjs2: 'moment',
root: 'moment',
},
},
{
'chart.js': {
commonjs: 'chart.js',
commonjs2: 'chart.js',
root: 'Chart',
},
},
{
'vue-router': {
commonjs: 'vue-router',
commonjs2: 'vue-router',
root: 'VueRouter',
},
},
],
output: {
libraryExport: 'default',
},
}
} else if (process.env.DEV_ADMIN) {
const TARGET = process.env.API_TARGET || 'http://127.0.0.1:5100'
vueConfig.devServer = {
disableHostCheck: true,
proxy: {
'/api/_plate/': { target: TARGET },
},
}
}
module.exports = vueConfig