Reputation: 7310
Most boilerplate I find includes "exclude": ["node_modules"]
but this property appears to be unnecessary given "include": ["src"]
(node_modules
being outside of src
). Am I missing something?
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "react-jsx",
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"outDir": "lib",
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "es5"
},
"exclude": ["node_modules"],
"include": ["src"]
}
Upvotes: 0
Views: 150
Reputation: 38046
No, it is not necessary because
"node_modules"
is one of the patterns excluded by default"exclude"
specifies an array of filenames or patterns that should be skipped when resolving "include"
(and as you pointed out it is out of src
anyway)Upvotes: 1