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"
}
}
}