module.exports = {
devServer: {
open: process.platform === 'darwin',
host: 'localhost',
port: 8085, //修改端口号
https: false,
hotOnly: false,
// 配置代理
proxy: {
'/api': {
target: 'http://api.server.com:8081/',
changeOrigin: true,
secure: false,
pathRewrite: {
'^/api': ''
}
}
}, // 设置代理
before: app => {}
},
};
vue配置代理和端口
最新推荐文章于 2025-05-10 19:27:25 发布
1万+

被折叠的 条评论
为什么被折叠?



