-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
35 lines (35 loc) · 955 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
module.exports = {
css: {
loaderOptions: {
less: {
modifyVars: {
'primary-color': '#1DA57A',
'font-size-base': '16px',
'font-size-sm': '14px'
},
javascriptEnabled: true
}
}
},
chainWebpack: (config) => {
if (process.env.NODE_ENV === 'development') {
config.plugins.delete('preload')
}
},
devServer: {
port: 8080,
host: "0.0.0.0",
https: false,
open: false, //在 server 启动后打开浏览器。默认禁用。
proxy: {
"/api": {
target: "http://0.0.0.0:5000", //设置调用的接口域名和端口
changeOrigin: true, //是否跨域
ws:true,
pathRewrite: {
"^/api": ""
}
}
}
}
}