docs: update devServer.proxy documentation (#2968) [ci skip]

So that it'll be obvious that proxies are configured via regexes. Usually it's not noticeable, but the original example becomes problematic when vue-router in history mode is used.

Here is a place where matching happens - 5786e273b2/packages/%40vue/cli-service/lib/util/prepareProxy.js (L69)
This commit is contained in:
Alexey Lebedeff
2018-11-27 09:45:24 +01:00
committed by Haoqun Jiang
parent 481e713302
commit ea312cfe50

View File

@@ -330,12 +330,12 @@ module.exports = {
module.exports = {
devServer: {
proxy: {
'/api': {
'^/api': {
target: '<url>',
ws: true,
changeOrigin: true
},
'/foo': {
'^/foo': {
target: '<other_url>'
}
}