直接创建一个 vue.config.js 文件,并在里面配置devServer。
module.exports = {
devServer: {
proxy: {
'/prefix/api/user/list': {
target: 'http://localhost:9999',
pathRewrite: {
'^/prefix': ''
}
}
},
}
}
直接创建一个 vue.config.js 文件,并在里面配置devServer。
module.exports = {
devServer: {
proxy: {
'/prefix/api/user/list': {
target: 'http://localhost:9999',
pathRewrite: {
'^/prefix': ''
}
}
},
}
}