I can\'t seem to get the outDir flag working when used in package.json. Directory structure is pretty simple: tsconfig.json at the root le
This is my folder structure.
Keep the typescript files in src folder and keep the tsconfig.json in root.
In tsconfig json file add foldername for outDir in compilerOptions
"compilerOptions": {
"outDir": "build",
"module": "commonjs",
"target": "es6",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": true,
"sourceMap": true
},
and run the below commands.
just cd to the root folder and type
tsc
or
tsc --outDir .
which will build the outDir folder with js and map.js files.
source: https://github.com/Microsoft/TypeScript/issues/10585