-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
feat: allow passing down "null" to disable server watcher #14208
Conversation
Run & review this pull request in StackBlitz Codeflow. |
I built some test cases earlier today. Check the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for this feature. This is also useful for Astro as it spins up a one-off server to load the config, and watching would be disabled.
Have one nit below.
Co-authored-by: Bjorn Lu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC in the last meeting we're ok with this as it doesn't change how plugins interact with the watcher (much).
The watcher test is a little unstable so I updated it. It's more naive but I think probably good enough. |
Description
Fixes #14189
Providing
null
inserver.watch
config option (similar tobuild.watch
) now disables the watcher altogether.Additional context
This helps with watch leaks in Vitest.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).