module.exports = {
publicPath: "./",
devServer: {
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
'/foo': {
target: '<other_url>'
}
}
}
};
标签:exports,http,target,pathRewrite,代理,module,api,反向
来源: https://www.cnblogs.com/jiang-lin/p/15220730.html