I'm trying to make an angular library with secondary entry point for every module.
I have three modules: A, B and C.
A is standalone, but B depends on C, meaning I have import
to get C.module.ts
in B.module.ts
.
I followed this article, so I have a package.json
, index.ts
and public_api.ts
files in every module.
When I try to build the lib, I get the following error:
------------------------------------------------------------------------------
Building entry point '@org/library-name/src/lib/A'
------------------------------------------------------------------------------
Compiling TypeScript sources through ngc
Bundling to FESM2015
Bundling to UMD
Minifying UMD bundle
Writing package metadata
Built @org/library-name/src/lib/A
------------------------------------------------------------------------------
Building entry point '@org/library-name/src/lib/B'
------------------------------------------------------------------------------
Compiling TypeScript sources through ngc
ERROR: Unable to write a reference to CComponent in /.../projects/library-name/src/lib/C/C.component.ts from /.../projects/library-name/src/lib/C/C.module.ts
Any idea on how to make it work? Thanks in advance.