我有一个Angular 9.0
项目。
我用这个命令创建新的库:
CCD_ 2。
当我为构建执行命令ng b @scope/xxx
时,我遇到了以下错误:
[error] Error: Custom named exports were specified for E:...distscopexxxfesm5scope-xxx.js but it does not appear to be a CommonJS module
如何修复这个错误?
这很奇怪,但这个解决方案很有用。
我将"module": "es2015"
添加到tsconfig.lib.json
文件库的compilerOptions
部分。
并修复了错误。