问题
I have implemented aot in my Angular 2 project, resolved all errors an finally my
"node_modules/.bin/ngc" -p tsconfig-aot.json
run successfully but I see only node_modules folder in aot folder and no app folder in it. So where can I get AppModuleNgFactory to bootstrap it?
This is my tsconfig-aot.json file
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es2015", "dom"],
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true
},
"files": [
"app/app.module.ts",
"app/main.ts"
],
"exclude": [
"node_modules",
"content/scripts/angular",
"content/scripts/jqwidgets",
"typings/main",
"typings/main.d.ts",
"typings/AmCharts.d.ts"
],
"angularCompilerOptions": {
"genDir": "aot",
"skipMetadataEmit" : true
}
}
回答1:
Changed my typescript version of packages.json
"typescript": "^2.0.3",
to
"typescript": "2.0.10",
It Worked!!
来源:https://stackoverflow.com/questions/41098430/angular-aot-app-folder-is-not-generated