mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit adds a new integration test which will help ensure that all exported `@NgModule`'s of framework packages can be imported by users without any errors. This test is generally useful, but with our upcoming changes with relative imports, this is a good safety-net. Relative imports could break re-exported NgModules inside NgModule's. For more details, see: https://github.com/angular/components/pull/30667 Notably we don't expect any issues for framework package as re-exporting `@NgModule`'s inside `@NgModule`'s is seemingly a rather rare pattern for APF libraries (confirmed by Material only having like 4-5 instances). PR Close #60489
573 B
573 B
This test is a safety check, ensuring that all @NgModule's exported by Angular framework
packages can be imported in user code without causing any build errors.
Occasionally, an @NgModule might re-export another module. This is fine, but there are
cases, especially with relative imports being used, where the compiler (in consuming projects)
is not able to find a working import to these re-exported symbols.
The re-exported symbols simply need to be re-exported from the entry-point. For more details on this, see: https://github.com/angular/components/pull/30667.