webpack配置多个代理地址
如何在vue脚手架中配置多个代理地址?格式如下:
现在/api和/api/tile前缀相同,但是要分发不同的地址,这个该怎么适配呢?
proxyTable: {
'/api': {
target: 'xxxx',
changeOrigin: true,
pathRewrite: {
'^/api': '/api'
}
},
'/api/tile': {
target: 'xxxx',
changeOrigin: true,
pathRewrite: {
'^/api/tile': '/api/tile'
}
}
}