hn_canteen_web/vue.config.js

25 lines
462 B
JavaScript

module.exports = {
// 反向代理
devServer: {
open: true,
host: '127.0.0.1',
port: 8080,
https: false,
hotOnly: false,
proxy: {
// 配置跨域
'/api': {
// target: 'https://vuets-api.herokuapp.com/api/',
target: 'http://127.0.0.1/',
ws: true,
changOrigin: true,
pathRewrite: {
'^/api': ''
}
}
},
before: app => {}
},
publicPath: '/canteen'
};