-
-
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: add chokidarOptions to override the default ignored #5223
Conversation
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.
I'm also missing a description in the PR. Could you explain why this is needed?
Does it resolve an issue?
May we want to merge chokidarOptions
and watchOptions
to one override object?
/** | ||
* use to override the default ignored | ||
*/ | ||
chokidarOptions?: any |
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.
Missing type, is there really no typedef exported by chokidar
that could be reused?
Co-authored-by: Shinigami <chrissi92@hotmail.de>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
You can use |
I want to override the ignored option, you can check the code, vite provide a ignored option to chockidar , and can't to be override , I need to watch an package in node_modules. @patak-js |
Maybe we should replace the default ignored if the user specify one. We should check if this was not done already for a reason |
Agree that we should allow users to override when provided. |
@patak-js @antfu Yes, Maybe check first is better, but it's not compatible |
What do you mean? Couldnt we check if ignored is present and use that instead of our default? |
If Someone use vitejs , and provide an ignored option before, it will not ignored node_modules and .git . |
Yes, this could be a breaking change. But I guess a pretty minor one that we could possibly fit in 2.7 |
Ok, i'm waiting 🤔 |
I suppose this fixes #5023, we should have it on the PR description |
yes |
Negated glob patterns have higher priority than positive ones. |
@sodatea |
@4-1-1 See the example in the corresponding documentation PR: https://github.com/vitejs/vite/pull/5239/files |
Description
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).