webpack-dev-middleware icon indicating copy to clipboard operation
webpack-dev-middleware copied to clipboard

Ability to disable "middleware delays requests until compiling has completed." for custom proxy middleware

Open Rush opened this issue 4 years ago • 3 comments

  • Operating System: openSUSE Tumbleweed
  • Node Version: 14
  • NPM Version: newest
  • webpack Version: newest
  • webpack-dev-middleware Version: newest

Feature Proposal

Ability to disable "middleware delays requests until compiling has completed." for custom proxy middleware

Feature Use Case

Forwarding API and Websocket requests to a separate Node.JS process. Today, all API / requests need to wait for the entire frontend rebult to complete which does not seem necessary.

Rush avatar Jul 08 '21 18:07 Rush

You can do it on own side, just create custom proxy server

alexander-akait avatar Jul 12 '21 09:07 alexander-akait

It needs to run on the same port so it needs to reuse the http server. A viable solution would be to allow hooking before the "wait for changes" middleware is set up.

Rush avatar Jul 12 '21 13:07 Rush

We can implement the filter option to filter request

alexander-akait avatar Jul 12 '21 13:07 alexander-akait