--watch is a neat feature during development. However, in my app I upload files to a directory named tmp. Whenever a file has been uploaded to this directory my app re-compiles which leads to all kinds of problems. I want to exclude tmp from being watched.
What I have tried so far is adding tmp to the "exclude": property in tsconfig.json, but this does not help.
I have looked at the documentation but I can't find any info on how to do this. https://www.typescriptlang.org/docs/handbook/configuring-watch.html
Is what I'm trying to achieve possible?
I actually have this working with the exclude on tsconfig like this:
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"preserveConstEnums": true,
"strict": true,
"target": "es2017",
"baseUrl": ".",
},
"exclude": ["__tests__"]
}
When i change any file on my __tests__ folder it will not compile again with watch mode.
NOTE: I'm using the latest tsc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With