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 viaimport
statements or<reference>
s. If you import [the module]levelup
, andlevelup
importsleveldown
, then excludingleveldown
ornode_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?