gilamran/tsc-watch

Ignores compilerOptions.outDir property on tsconfig.json

Closed this issue · 4 comments

Context
I've included the outDir property in the tsconfig.json file.
image

Problem
But, when I run tsc-watch ./typescriptDir/file.ts, it compiles it in the same directory. Like, ./typescriptDir/file.js

Expected Behavior
The tsc-watch ./typescriptDir/file.ts command should output the compiled code in the directory mentioned in outDir.
Like, ./build/file.js

I'm currently getting the same issue.

This is a regular tsc (Typescript) behavior.
Try doing the same with tsc instead of tsc-watch and you will get the same result.

You have two options when running the compile (You can't mix the two):

  1. Give it options and files to compile
  2. Give it a project file (tsconfig.json) with all your options and files.

still relevant?

still relevant?

Nope!
Is fixed by following your suggestion