-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
81 lines (80 loc) · 1.64 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
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
77
78
79
80
81
/**
* 配置该文件可以参考:
* https://cli.vuejs.org/zh/config/#%E7%9B%AE%E6%A0%87%E6%B5%8F%E8%A7%88%E5%99%A8
*
*/
const url = 'https://www.fastmock.site/mock/552fac5cc88f27249bff9351eeca2683/api'
// 基础路径,发布前修改这里,当前配置打包出来的资源都是相对路径
let publicPath = './'
module.exports = {
configureWebpack: {
externals: {
"BMap": "BMap"
}
},
publicPath: publicPath,
// eslint校验
lintOnSave: false,
productionSourceMap: false,
// 配置转发代理
devServer: {
proxy: {
'/auth': {
target: url,
ws: true,
pathRewrite: {
'^/auth': '/auth'
}
},
'/admin': {
target: url,
ws: true,
pathRewrite: {
'^/admin': '/admin'
}
},
'/code': {
target: url,
ws: true,
pathRewrite: {
'^/code': '/code'
}
},
'/gen': {
target: url,
ws: true,
pathRewrite: {
'^/gen': '/gen'
}
},
'/member': {
target: url,
ws: true,
pathRewrite: {
'^/member': '/member'
}
},
'/wechat': {
target: url,
ws: true,
pathRewrite: {
'^/wechat': '/wechat'
}
},
'/logistics': {
target: url,
ws: true,
pathRewrite: {
'^/logistics': '/logistics'
}
},
'/iot': {
target: url,
ws: true,
pathRewrite: {
'^/iot': '/iot'
}
}
}
}
}