-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite does not shutdown properly when calling close() on the ViteDevServer #4079
Comments
I've taken a look, and I guess I don't see where a call to Edit: I'm still taking a look into this, because I'm not super-familiar with node.js conventions and expectations. |
It seems to be the addition of |
Yup that resolves it, thank you |
It shouldn't be necessary for a node process to call process.exit() for the process to end. If everything has been "cleaned up" and stopped. The process should end by itself. |
I found my way here debugging vite-jest not working with [email protected]. It looks like #4082 is close to merging so hopefully a fix can be published soon. In the meantime, using [email protected] or setting |
Describe the bug
I would expect after running this script that the process would end:
This is problematic when using the ViteDevServer with Jest as the process doesn't end cleanly after the server is closed.
This was the commit that introduced the issue: 5999444
Reproduction
This was introduced in Vite 2.4.0-beta.0
https://github.com/schalk-b/vite-not-shutting-down
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: