-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add a way to exclude file or directory watching #36035
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
Comments
This looks like the typescript extension watching all files and folders. |
Maybe #33338 |
@slanden btw thanks for that script to track the watchers, very useful 👍 |
Yes, we bundle it. |
We do not use vs code exclude settings for watches.. But #35615 enables us to add option to exclude directory/file watching certain things. Its not as simple as that though since we watch |
Is this something we can do today, or just work towards it? I have two build tasks - one using webpack (for my VS Code extension) and one using
I've no idea why it's hanging, but I'd like to exclude the |
Open your tsconfig.json file: This file is usually located at the root of your TypeScript project. Add an exclude field: If the exclude field is not already present, you need to add it. This field specifies an array of file paths or patterns that the TypeScript compiler should ignore. |
Template info added by @mjbvz
TypeScript Version: 3.7.3
Search terms:
Steps to Reproduce:
The script results show these two two Code paths if using regular VS Code:
OR for VS Code Insiders, the files would be:
Does this issue occur when all extensions are disabled?: Yes
What is expected?
node_modules/
should be excluded from being watched, whether by the VS Code default Watcher Exclude patterns or by setting them explicitly in settings.json.My Settings
My VS Code Watcher Exclude settings have the following ignore patterns by default.
Adding them explicitly to settings.json with
ultimately doesn't work. I say "ultimately" because I noticed when I first added it, the two VS Code watcher paths and their watchers were removed for that session. But, upon restarting VS Code they were back and I was hitting the "watcher limit reached" error again.
I have found other GitHub issues that were similar, but not the same. Issue microsoft/vscode#59679 is the closest to what I'm experiencing but it was closed as a duplicate to microsoft/vscode#40898. This is not a duplicate issue to microsoft/vscode#40898 as this is for a single-root workspace.
The text was updated successfully, but these errors were encountered: