I am facing an issue with my tsconfig.json
file:
{
"compilerOptions": {
"target": "ES6",
"lib": [
"DOM",
"ES6"
]
},
"include": [
"src/server/**/*"
],
"exclude": [
"node_modules",
"dist",
"public"
]
}
When I executed tsc --project tsconfig.json
, it completely disregarded the include
and exclude
settings causing a failure during compilation of files in the node_modules
directory.
The only way it compiled successfully was using tsc src/server/**/*.ts
, but this method did not adhere to the defined configuration.
I made sure that the compiler was reading the config file, as adding "watch": true
under "compilerOptions"
triggered the watch mode upon any changes made.
I referred to the documentation but couldn't find the resolution. The placement of the configurations in the JSON file seemed correct to me.
Does anyone have a solution for this problem?
Compiler version running on macOS Big Sur:
% tsc -v
Version 4.0.5