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?