-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin API can not change the proxy, why? #2053
Comments
|
@Fl0pZz How did you add devServer config? Can't reproduce this issue with the following config. module.exports = {
chainWebpack: config => {
config
.devServer
.proxy({
'/api': 'http://localhost:3000'
})
}
} |
https://cli.vuejs.org/config/#devserver-proxy // vue.config.js
module.exports = {
devServer: {
proxy: {
'/api': {
target: '<url>',
ws: true,
changeOrigin: true
},
'/foo': {
target: '<other_url>'
}
}
}
} |
@sodatea and your code don't work, because https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/util/prepareProxy.js#L116 |
Oh, sorry. |
However, the original question remains open: |
Version
3.0.0-rc.10
Node and OS info
node 10.7
Steps to reproduce
Plugin API can not change the proxy, why?
vue-cli/packages/@vue/cli-service/lib/commands/serve.js
Line 46 in cf6290f
What is expected?
I expect that I can change the proxy settings, through Plugin API and webpack config (chaining or configure)
What is actually happening?
Nothing
The text was updated successfully, but these errors were encountered: