1

I'm writing a vscode extension, and I want to watch specific file changes in node_modules according to the extensions's configuration, but I don't want user to change their default files.watcherExclude. What should I do?

For example, considering vscode's native typescript language feature, when I change a .d.ts file in node_modules, the ts-server can detect that and provide the latest intellisense. How does ts-server watch file changes in node_modules?

Arichy
  • 93
  • 1
  • 2
  • 7
  • It sounds like you can watch specific files non-recursively yes? From ` workspace.createFileSystemWatche()`: "If you need to watch in a location that is typically excluded (for example node_modules or .git folder), then you can use a non-recursive watcher in the workspace for this purpose." – Mark Aug 24 '22 at 17:30
  • I tried `workspace.createFileSystemWatcher("/Users/myname/proj/node_modules/mod/index.css")`, but it still does not work. Nothing happens after changing `index.css` – Arichy Aug 24 '22 at 17:36

0 Answers0