How can I get the Typescript compiler to output the compiled js to a different directory?

Since Typescript 1.5, this can also be set in the tsconfig.json file:

"compilerOptions": {
    "outDir": "DIRECTORY"
    ...

original answer

Use the option --outDir on tsc (configured within the File Watcher in IntelliJ)

From the command line documentation

--outDir DIRECTORY Redirect output structure to the directory.

Leave a Comment