Exclude node_modules from indexing but keep typescript declarations.

The problem is if I exclude node_modules from indexing Iose IntelliSense and all the help regarding the packages I use.
However, If I don't exclude it, I see node_modules stuff appear in search, refactor, and other unnecessary places.

All I want to do is to only keep TS Declarations and not to see node_modules packages anywhere in search.

5 comments
Comment actions Permalink

The IDE auto-excludes node_modules, but adds direct project dependencies to javascript library for completion/navigation, etc. so that they still appear in search when using the scopes that include libraries, this is expected

You can disable the auto-generated library and create a new one, adding the required folders with types definitions to it only

0
Comment actions Permalink

I had a problem completion didn't work so I stopped excluding node_modules.
What do you mean by direct project dependencies? doesn't IDE include dev dependencies for code completion/navigation, etc?

0
Comment actions Permalink

Direct means the dependencies listed in package.json, both dependencies and devDependencies.

0
Comment actions Permalink

so If node_modules is marked as excluded still the code completion should be available, right?.

0
Comment actions Permalink

Yes - if the auto-created library is there

0

Please sign in to leave a comment.