TypeScript can have issues with with more folders containing TypeScript files than just the one used as rootDir
,
(e.g. migrations/
for Knex). (E.g. see this now archived/locked issue microsoft/TypeScript#9858).
The exclude
option in tsconfig.json
won't prevent this issue.
Instead use the include
option and include only the rootDir
folder.
Example (showing only the relevant fields):
{
"compilerOptions": {