I am trying to exclude some files from my typescript compilation because my editor writes temporary files that are causing extraneous recompiles when making changes. I have in my tsconfig.json:
"exclude": ["*flycheck*", "**/*flycheck*"]
I am using tsc --watch to watch for changes and compile.
This works, until I add a baseUrl to my config like so:
"baseUrl": "src",
I'm using baseUrl because I prefer absolute import paths over relative.
I have tried adjusting the exclude globs but cannot for the life of me get typescript to ignore these files when the baseUrl is set. Is there some reason that the file exclusions would not work with a baseUrl?
Do you have an
includein your tsconfig.json?From the docs: https://www.typescriptlang.org/tsconfig#exclude
It means that it has no effect if
includeorfilesaren't present.