-
Notifications
You must be signed in to change notification settings - Fork 24
/
vue.config.js
48 lines (47 loc) · 1.48 KB
/
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
47
48
const path = require('path')
const resolve = dir => path.join(__dirname, dir)
module.exports = {
publicPath: '/',
outputDir: './dist',
lintOnSave: true,
chainWebpack: (config) => {
config.resolve.alias.set('@', resolve('src'))
},
devServer: {
// During local test, configure host and add 127.0.0.1 dev.iast.huoxian.cn
host: process.env.DEVSERVER_HOST,
// Module hot swap with webpack enabled
hot: true,
// Only hot replacements are allowed
hotOnly: true,
https: true,
port: 1024,
open: true,
proxy: {
[process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_TARGET_HOST,
changeOrigin: true
},
[process.env.VUE_APP_BASE_API_V2]: {
target: process.env.VUE_TARGET_HOST,
changeOrigin: true
},
[process.env.VUE_APP_BASE_SCA_V1]: {
target: process.env.VUE_TARGET_HOST,
changeOrigin: true
},
[process.env.VUE_APP_BASE_SCA_V2]: {
target: process.env.VUE_TARGET_HOST,
changeOrigin: true
},
[process.env.VUE_APP_UPLOAD]: {
target: process.env.VUE_TARGET_HOST,
changeOrigin: true
},
'/openapi': {
target: process.env.VUE_TARGET_HOST,
changeOrigin: true
},
}
}
}