After configuring TypeScript and Angular compiler with the following settings:
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noEmitHelpers": true,
"skipDefaultLibCheck": true,
"strictNullChecks": false,
"outDir": "tmp"
},
"exclude": [
"node_modules",
"compiled",
"app/main.ts"
],
"angularCompilerOptions": {
"genDir": "compiled",
"skipMetadataEmit" : true
}
}
The /compiled directory only consists of /node_modules/@angular, while the necessary ngfactory files in the /app directory are missing. The compilation process completes quietly without any errors or output.
It seems to work smoothly with TypeScript 2.0, but I aim to utilize version 2.1 for async/await functionality when targeting es5 to avoid additional compiling steps using Babel.
[Edit]
This issue arises from Typescript 2.1.0-dev.20160907 onwards, precisely after the introduction of async/await support. There's a possibility that one of the modifications in this version has caused ngc
to malfunction; whereas version 2.1.0-dev.20160906 was functioning correctly.
[Edit2]
If you've attempted using ngc
with TypeScript 2.1, please share your experience in a brief comment to help me determine if the issue lies within my configuration.