【问题标题】:Angular2 angula-cli AOT supportAngular2 angular-cli AOT 支持
【发布时间】:2016-11-28 08:29:07
【问题描述】:

操作系统?

Mac OSX 优胜美地

版本。

angular-cli: 1.0.0-beta.21 节点:6.3.0 操作系统:达尔文 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 中的任何更改都不会影响任何内容。 任何想法或帮助将不胜感激。

谢谢

【问题讨论】:

    标签: angular angular-cli angular2-aot


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2017-06-07
      • 2017-03-30
      • 2018-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-21
      • 2017-05-19
      相关资源
      最近更新 更多