We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Passing an Array to devServer.proxy is not supported. It can be used to proxy multiple, specific paths to the same target.
https://webpack.js.org/configuration/dev-server/#devserver-proxy
module.exports = { //... devServer: { proxy: [{ context: ['/auth', '/api'], target: 'http://localhost:3000', }] } };
The text was updated successfully, but these errors were encountered:
devServer.proxy
You can get equivalent functionality via:
{ proxy: { ...['/auth', '/api'].reduce( (acc, ctx) => ({ ...acc, [ctx]: { target: 'http://localhost:3000' }, }), {} ), }, },
Sorry, something went wrong.
Any update on that issue?
No branches or pull requests
What problem does this feature solve?
Passing an Array to devServer.proxy is not supported.
It can be used to proxy multiple, specific paths to the same target.
https://webpack.js.org/configuration/dev-server/#devserver-proxy
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: