Typescript not ignoring node_modules Typescript not ignoring node_modules typescript typescript

Typescript not ignoring node_modules


Why "exclude" doesn't work:

"exclude" only prevents items from being included by "include"; it doesn't prevent them from being included via import statements or <reference>s. If you import [the module] levelup, and levelup imports leveldown, then excluding leveldown or node_modules won't have an effect. (reddit)

TS reference: https://www.typescriptlang.org/tsconfig#exclude

Maybe you should try the option --skipLibCheck.

See also the FAQ: Why is a file in the exclude list still picked up by the compiler?