vue project, how to configure multiple interface addresses for webpake (does not refer to different addresses for raw development and production environments).
the address of the interface server provided by the background is different, and different interface addresses are configured with agents in the development environment, but can multiple addresses be configured in the prod.env.js file when build
related codes
/ / Agent is configured in config
proxyTable: {
"/Wei":{
target: "http://xxx.xxx.xxx.1:8686",
changeOrigin: true,
pathRewrite: {
"^/Wei": "/Wei"
},
},
"/ios":{
target: "http://xxx.xxx.xxx.2:8014",
changeOrigin: true,
pathRewrite: {
"^/ios": "/ios"
},
},
},
/ / prod.env.js file
"use strict"
module.exports = {
NODE_ENV: ""production"",
// BASE_API: ""http://xxx.xxx.xxx.1:8686"",
// BASE_API: ""http://xxx.xxx.xxx.2:8014"",
}