VS Code file watch limit reached: node_modules not excluded

Question: Is it safe to exclude these three sources in the Watcher Exclude settings of VS Code, and if so, how?

Issue

When running a Vue project with less than 50 files in VS Code, an error is thrown: Error: ENOSPC: System limit for number of file watchers reached. Sources causing this are likely the following:

| Watchers | Source                                                                                                                   |
| -------- | ------                                                                                                                   |
| 4033     | /usr/share/code/code --max-old-space-size=3072 /usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsse |
| 3889     | /usr/share/code/code /usr/share/code/resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js --globalTy |
| 99       | /usr/share/code/code /usr/share/code/resources/app/out/bootstrap-fork --type=watcherService                              |

The default VS Code Watcher Exclude settings are:

"files.watcherExclude": {
    "**/.git/objects/**": true,
    "**/.git/subtree-cache/**": true,
    "**/node_modules/**": true
  }

Is it safe to exclude these three sources in the Watcher Exclude settings of VS Code?

Yes, it is safe to exclude these three sources in the Watcher Exclude settings of VS Code. To do so, add the following lines to your settings.json file:

"files.watcherExclude": {
    "**/.git/objects/**": true,
    "**/.git/subtree-cache/**": true,
    "**/node_modules/**": true,
    "**/typescript/lib/tsse/**": true,
    "**/typescript/lib/typingsInstaller.js/**": true,
    "**/out/bootstrap-fork/**": true
  }

This will exclude the three sources mentioned in the error message from being watched by VS Code, which should resolve the issue.