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
There can be many situations when you need to clean up or release a resource when a vite instance restarts, like after a config edit. You might have to close a db connection, there might be files that need to be cleared or reset, etc.
But if you have something like vite dev running and you connect to a database and then change a file that causes a service restart, the connection stays open in the background.
Suggested solution
If there would be some signal sent that could be intercepted to tell us that a restart was going to happen, that would be enough.
A very rough idea is something like, there can be other ways, just something to help us react to this restart if we need.
Description
There can be many situations when you need to clean up or release a resource when a vite instance restarts, like after a config edit. You might have to close a db connection, there might be files that need to be cleared or reset, etc.
But if you have something like
vite dev
running and you connect to a database and then change a file that causes a service restart, the connection stays open in the background.Suggested solution
If there would be some signal sent that could be intercepted to tell us that a restart was going to happen, that would be enough.
A very rough idea is something like, there can be other ways, just something to help us react to this restart if we need.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: