Proxy sets multiple request addresses in vue

problem description

vue-cli build project, set multiple identical target and pathRewrite, in index.js proxyTable in config how to set common request address and BASE_API in dev.env.js, test.env.js and prod.env.js

the environmental background of the problems and what methods you have tried

Multiple requesting interface addresses can be set in index.js in

config, but it is not clear how to extract the interface addresses and put them in env.js

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Feb.16,2022

refer to the corresponding dev file according to the environment, and put the configuration in proxyTable

.
Menu