javascript
"devServer": {
"disableHostCheck": true,
"proxy": {
"/api": {
// 需要被代理的后台地址
"target": "http://自己的地址",
"changeOrigin": true,
"secure": false,
"pathRewrite": {
"^/api": ""
}
}
}
},

自己请求的地址
javascript
export const apiServer = 'http://localhost:8080/api/'