forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(compiler): allow disabling external symbol factory reexports
Currently external static symbols which are referenced by AOT compiler generated code, will be re-exported in the corresponding `.ngfactory` files. This way of handling the symbol resolution has been introduced in favor of avoding dynamically generated module dependencies. This behavior therefore avoids any strict dependency failures. Read more about a particular scenario here: angular#25644 (comment) Now with `ngtsc`, this behavior has changed since `ngtsc` just introduces these module dependencies in order to properly reference the external symbol from its original location (also eliminating the need for factories). Similarly we should provide a way to use the same behavior with `ngc` because the downside of using the re-exported symbol resolution is that user-code transformations (e.g. the `ngInjectableDef` metadata which is added to the user source code), can resolve external symbols to previous factory symbol re-exports. This is a critical issue because it means that the actual JIT code references factory files in order to access external symbols. This means that the generated output cannot shipped to NPM without shipping the referenced factory files. A specific example has been reported here: angular#25644 (comment)
- Loading branch information
1 parent
50732e1
commit 883fb4b
Showing
4 changed files
with
78 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters