We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
wanna to watch external folder or node_modules/xx .
const { ignored = [], ...watchOptions } = serverConfig.watch || {} const watcher = chokidar.watch(path.resolve(root), { ignored: [ '**/node_modules/**', '**/.git/**', ...(Array.isArray(ignored) ? ignored : [ignored]) ], ignoreInitial: true, ignorePermissionErrors: true, disableGlobbing: true, ...watchOptions }) as FSWatcher
https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/index.ts#L321-L332
add something like rootPaths , to watch options .
No response
The text was updated successfully, but these errors were encountered:
What's the use case?
Sorry, something went wrong.
@sodatea My project use a private npm package, so i need to watch specific package in node_modules.
Could you try negated glob patterns to see if it overrides the default ignored patterns? Something like ignored: ['!**/node_modules/**']
ignored: ['!**/node_modules/**']
I just tested and it worked.
So let's just add a note in the documentation instead of adding a new option.
node_modules
Successfully merging a pull request may close this issue.
Clear and concise description of the problem
wanna to watch external folder or node_modules/xx .
https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/index.ts#L321-L332
Suggested solution
add something like rootPaths , to watch options .
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: