typescript outDir setting in tsconfig.json not working
Solution 1:
When you pass in files for compilation with tsc src/index.ts
, your tsconfig.json
is ignored.
From the documentation:
When input files are specified on the command line, tsconfig.json files are ignored.
Your npm build script should just be tsc
without passing any files.
Solution 2:
If you are using the incremental
compiler option, you may not be getting output if you have deleted / modified files in your outDir
but have not removed the .tsbuildinfo
file.
My issue was a bit different, but Google brought me here - so figured others may also.