## Current Behavior
When an `ng-package.json` file of an Angular library secondary entry
point does not specify `lib.entryFile`, the
`@nx/enforce-module-boundaries` rule throws an error. The
`ng-package.json` file of an Angular secondary entry point can be as
simple as `{}`, but it would cause the rule to throw an error.
## Expected Behavior
The `@nx/enforce-module-boundaries` rule should correctly handle an
`ng-package.json` file of an Angular library secondary entry point that
does not specify `lib.entryFile`. The property should [default to
`src/public_api.ts`](22a7ba1979/src/ng-entrypoint.schema.json (L20)).
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
This PR adds support for package.json based secondary entry points and
implements fix for situation when package imports base entry point as
dynamic dependency and secondary entry point as static dependency.
## Current Behavior
When the package is imported from itself, check for a secondary entry
point checks only Angular-style secondary entry points.
When package is importing from the same library as dynamic import from
root and static import from secondary entry point we still get linter
errror.
## Expected Behavior
Check for secondary entry points should also support standard
package.json-based entry points.
Importing from the same library as dynamic import from root and static
import from secondary entry point should be allowed.
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
Fixes#18552