-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow disabling file watchers for vite-node #5488
Comments
Actually vitest/packages/vitest/src/node/plugins/workspace.ts Lines 59 to 62 in e4e939b
Probably we can simply set vitest/packages/vite-node/src/cli.ts Lines 88 to 90 in e4e939b
|
I thought that
|
I'd like to add that exclude nor negative include seem to prevent this from happening. If you have a lot of files under your repo on Linux, you'll hit this. The include/exclude should do early cutoff so that it doesn't descend into ignored directories. UPDATE: in one repo, no issues with vitest v2, but in the other, still. |
Clear and concise description of the problem
I have a few
.ts
scripts that I run on my server. They are scripts that run through and then exit, so I don't need file watching. Of course, it wouldn't matter either way, but I started getting this error when the files in my project increased:My limit was set to the default of 8192. This is already weird, because I only have ~604 files in my project, but whatever.
Suggested solution
I propose a flag like
--no-watch
that disables file watchers for cases where you don't need them.Alternative
I'm currently solving this by setting
server.watch: null
in a dedicatedvite-node.config.js
to disable the watcher: https://vitejs.dev/config/server-options.html#server-watchAdditional context
No response
Validations
The text was updated successfully, but these errors were encountered: