starcorn
starcorn

Reputation: 8551

Typescript: tsconfig.json outDir property does not work

I have the following tsconfig.json, and I want to have the transpiled output in build/ folder

{
    "compileOptions": {
        "module": "amd",
        "noImplicitAny": "true",
        "removeComments": "true",
        "target": "es5",
        "sourceMaps": true,
        "outDir": "build/"
    },
}

However it doesn't work. The only way I got it to work is to pass outDir as a flag to tsc.

I found one question which asked about the same issue I have. However I'm using typescript version 1.8.10. And I've tried the suggested solution there which I still couldn't get it to work.

Anyone know how I can have tsc read outDir property which is set in the tsconfig.json file?

Upvotes: 3

Views: 3095

Answers (1)

michaelmesser
michaelmesser

Reputation: 3726

The option name is compilerOptions not compileOptions.

{
    "compilerOptions": {
        "module": "amd",
        "noImplicitAny": "true",
        "removeComments": "true",
        "target": "es5",
        "sourceMaps": true,
        "outDir": "build/"
    },
}

Upvotes: 2

Related Questions