Angular 7 开发自定义库时,引用ngZorroAntd,build过程中出现

No name was provided for external module 'ng-zorro-antd' in output.globals – guessing 'ngZorroAntd' 错误 

解决方法: 

在库所在目录的ng-package.json中,填加红色部分

{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/test-lib",
"lib": {
"entryFile": "src/public_api.ts",
"umdModuleIds": {
"ng-zorro-antd": "^7.0.0-rc.1"
}
}
}

相关文章:

  • 2021-04-14
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2021-04-30
  • 2021-09-08
  • 2021-08-16
  • 2022-03-04
猜你喜欢
  • 2021-09-29
  • 2021-08-21
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
相关资源
相似解决方案