angular-docs-cn/packages/compiler/src/aot
Paul Gschwendtner 872a3656fe refactor(compiler): allow disabling external symbol factory reexports (#28594)
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: https://github.com/angular/angular/issues/25644#issuecomment-458354439

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: https://github.com/angular/angular/issues/25644#issue-353554070

PR Close #28594
2019-02-11 17:12:50 +00:00
..
compiler.ts refactor(compiler): allow disabling external symbol factory reexports (#28594) 2019-02-11 17:12:50 +00:00
compiler_factory.ts feat(compiler): add basic support for in ivy/i18n code generation (#22654) 2018-03-22 19:01:51 -04:00
compiler_host.ts refactor(compiler): remove old ngtools api and add listLazyRoutes to new api (#19836) 2017-10-23 18:46:04 -04:00
compiler_options.ts refactor(compiler): allow disabling external symbol factory reexports (#28594) 2019-02-11 17:12:50 +00:00
formatted_error.ts feat(compiler-cli): improve error messages produced during structural errors (#20459) 2017-11-27 16:59:57 -06:00
generated_file.ts Revert "Revert "Revert "perf(compiler): skip type check and emit in bazel in some cases. (#19646)""" 2017-10-12 16:09:49 -07:00
lazy_routes.ts refactor(compiler): remove old ngtools api and add listLazyRoutes to new api (#19836) 2017-10-23 18:46:04 -04:00
partial_module.ts feat(compiler): implement "enableIvy" compiler option (#21427) 2018-01-18 18:22:44 -06:00
static_reflector.ts build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
static_symbol.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
static_symbol_resolver.ts fix(compiler): generate relative paths only in summary file errors (#26759) 2018-10-26 18:07:55 -04:00
summary_resolver.ts build(bazel): remove workaround no longer needed for module names for ngfactory & ngsummary files (#25604) 2018-08-22 21:11:18 -04:00
summary_serializer.ts refactor(compiler): allow disabling external symbol factory reexports (#28594) 2019-02-11 17:12:50 +00:00
util.ts fix(compiler): make tsx file aot compatible 2017-12-15 07:53:46 -08:00