vavite icon indicating copy to clipboard operation
vavite copied to clipboard

feat: put requests on hold during initialization

Open nitedani opened this issue 3 years ago • 0 comments

Right now, if the user server application needs a long amount of time to register the http listener, vite will return 404. For example, NestJS needs time to build its module container before it can listen to requests.

With this change, the incoming requests will be buffered until the user application registers it's http listener, or until a short timeout(not request time-out, the time is counted from after the server entry is loaded).

This is useful when using the "vite --open" command, so the browser window won't show 404.

nitedani avatar Aug 31 '22 21:08 nitedani