Sometimes, we want to force TypeScript tsc to ignore node_modules folder.
In this article, we’ll look at how to force TypeScript tsc to ignore node_modules folder.
How to force TypeScript tsc to ignore node_modules folder?
To force TypeScript tsc to ignore node_modules folder, we can set the skipLibCheck
option to true
.
For instance, we write
{
//...
"compilerOptions": {
"skipLibCheck": true
}
//...
}
to set the compilerOptions.skipLibCheck
option to true
in tsconfig.json
to skip the node_modules
folder check.
Conclusion
To force TypeScript tsc to ignore node_modules folder, we can set the skipLibCheck
option to true
.
One reply on “How to force TypeScript tsc to ignore node_modules folder?”
helped a lot, thanks!