简体   繁体   English

Angular 2 AOT编译需要组件名称

[英]Angular 2 AOT compilation requires component name

I have an issue with AOT compilation. 我对AOT编译有问题。 When I run a build task it asks me for some new component name. 运行构建任务时,它会要求我提供一些新的组件名称。 It will be an issue for CI. 对于CI来说将是一个问题。 Here is an Example . 这是一个例子

My tsconfig.json file: 我的tsconfig.json文件:

{
  "compilerOptions": {
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [ "es6", "dom" ],
    "mapRoot": "./",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "target": "es5",
    "typeRoots": [
      "./node_modules/@types"
    ],
    "types": [
      "node"
    ],
    "noUnusedLocals": true,
    "pretty": true,
    "removeComments": true
  },
  "angularCompilerOptions": {
    "genDir": ".",
    "entryModule": "src/app/app.module#AppModule"
  }
}

Could someone please advise how to avoid this name input?` 有人可以建议如何避免输入此名称吗?

Actually, it wasn't an issue! 实际上,这不是问题! Be careful because there is a package with name "ngc" in npm so it has the same name as Angular Compiler CLI. 注意,因为npm中有一个名称为“ ngc”的软件包,因此它与Angular Compiler CLI的名称相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM