#Having race conditions with HMR overlay

1 messages · Page 1 of 1 (latest)

wide marten
#

I'm working on a framework that uses Vite.createServer under the hood.

When a user tries to import an NPM module that isn't installed, I'm only getting the HMR error overlay 50% of the time.

It looks like there is a web socket race condition, and if both of these vite-plugin-checker:reconnect events go before the error event, the HMR overlay works.

Does anyone know how to make this consistently work, so the error is always visible to the user?

#

Wait a minute... vite-plugin-checker is a 3rd party thing...

#

one sec