You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that some of http-proxy-middleware's features do not require a target key, e.g. its router feature, but you will still need to include a target key in your configuration here, otherwise webpack-dev-server won't pass it along to http-proxy-middleware).
@alexander-akait As far as I can tell, I can use pretty much any value I want as long as it's truthy. Currently I'm using 'dummy' which is working fine. The point is, I shouldn't have to specify a target if it's always going to be overridden by router anyway.
Code
Expected Behavior
I expect to be able to use the
router
feature ofhttp-proxy-middleware
without having to specify atarget
.Actual Behavior
When
target
is missing, the proxy middleware is not used at all:webpack-dev-server/lib/Server.js
Lines 281 to 283 in 516d7b1
Which is also noted in the documentation:
Recently, the validation in
http-proxy-middleware
has been updated to allow for configurations without atarget
key. I suggest to do the same here and extend the condition toproxyConfig.target || proxyConfig.router
.The text was updated successfully, but these errors were encountered: