I want to compile just the "src" folder. hence i do include:["src"]
, and node_modules are found outside src only, then why do i need to exclude them like, exclude: ["node_modules"]
as suggested by many sites?
e.g. they have also suggested that we include src and then exclude node_modules too - https://www.javatpoint.com/typescript-compilation-context
{
"compilerOptions": {
"module": "system",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"outFile": "../../built/local/tsc.js",
"sourceMap": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}
I shouldn't have to write any exclude in my tsconfig.json, right?