uksz February 2016

Tsconfig and outDir issue

I am having issue with my outDir in tsconfig.json.

I have the following tsconfig file:

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false,
    "outDir": "dist",
    "outFile": "App.js"
  },
  "exclude": [
    "node_modules",
    "local_typings"
  ]
}

The files are compiled to App.js, however not in the directory I've specified (dist), but in the directory, where tsconfig file is. Anyone has found solution to this problem?

Answers


uksz February 2016

Actually, I found out what was the issue. I think its pretty funny: its enough to specify file path and file name in the outFile, without using outDir. So, in this case, this would be:

"outFile":"dist/App.js"

Have a good one!

Post Status

Asked in February 2016
Viewed 1,455 times
Voted 10
Answered 1 times

Search




Leave an answer