Reputation: 187
I've got a problem with tsc that's driving me insane
I've got a file b.ts
in src
folder. and a a.ts
in my project root folder.
this is my tsconfig file:
{
"compilerOptions": {
"outDir": "build3"
},
"rootDir": "src"
}
but when i compile it using tsc -build tsconfig.json
i get both a and b file in build folder, including folder src. but I want just b.js
in build folder!. if I remove a.ts
thing will be alright. but is there's any .ts file in root folder then everything gets compiled!
I've tried using files
, exclude
, include
, rootDir
options in config file but nothing works...
HELP ME!!
Upvotes: 1
Views: 3332
Reputation: 187
As Aluan Haddad mentioned. rootDir
should be under compilerOptions
and combined with a "include":["src/*.ts"]
solved my problem.
Thanks.
Upvotes: 2