Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): ensure that autoRegisterModuleById registration in ɵɵdefineNgModule is not DCE-ed by closure #42529

Closed

Commits on Jun 9, 2021

  1. fix(core): ensure that autoRegisterModuleById registration in ɵɵdefin…

    …eNgModule is not DCE-ed by closure
    
    Previously the autoRegisterModuleById registration was marked with noSideEffects wrapper to ensure that we don't end up retaining all NgModules.
    
    However the return value was not referenced by anything, so closure compiler removed it because it determined that this code has no side effects and is not referenced by anyone.
    
    This issue affects apps that use Closure Compiler and also rely on https://angular.io/api/core/getModuleFactory to retrieve factories by ID. This combination is used heavily in google3, especially in Pantheon.
    
    Fixes b/188453434
    IgorMinar committed Jun 9, 2021
    Copy the full SHA
    de6c55a View commit details
    Browse the repository at this point in the history