Angular2 angula-cli AOT支持

时间:2016-11-28 08:29:08

标签: angular angular-cli angular2-aot

OS?

  

Mac OSX Yosemite

版本。

angular-cli:1.0.0-beta.21 节点:6.3.0 os:darwin x64

失败给出的日志。 (有很多这个)

  

导出变量'slideInPartial'已经或正在使用来自外部模块“/ node_modules / @ angular / core / src / animation / metadata”的名称'AnimationEntryMetadata',但无法命名。)

提及可能有用的任何其他细节。

tsconfig.aot.json:

{ "declaration": false, "compilerOptions": { "target": "es5", "module": "es2015", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": false, "suppressImplicitAnyIndexErrors": true, "pretty": true, "allowUnreachableCode": false, "allowUnusedLabels": false, "noImplicitAny": false, "noImplicitReturns": false, "noImplicitUseStrict": false, "noFallthroughCasesInSwitch": true, "noEmitOnError": true, "outDir": "./dist/unbundled-aot", "types": [ "node", "jasmine" ], "paths": { "angular-cli/*": [ "./packages/angular-cli/*" ], "@angular-cli/ast-tools": [ "./packages/ast-tools/src" ], "@angular-cli/base-href-webpack": [ "./packages/base-href-webpack/src" ], "@ngtools/webpack": [ "./packages/webpack/src" ] } }, "exclude": [ "node_modules", "dist", "packages/angular-cli/blueprints/*/files/**/*", "dist/**/*", "node_modules/**/*", "tmp/**/*" ], "angularCompilerOptions": { "genDir": "aot", "skipMetadataEmit": true } }

执行命令: ng serve --aot -p src/tsconfig.aot.json

tsconfig.aot.json中的任何更改都不会影响任何内容。 任何想法或帮助将不胜感激。

谢谢

1 个答案:

答案 0 :(得分:0)

在使用angular-cli 1.0.0-beta.22-1升级项目时遇到同样的问题。我只是将AnimationEntryMetadata中的@angular/core导入到我的动画文件中,然后就可以了。

关于你的问题的一些解读(似乎与.d.ts发射有关):

相关问题