fix(compiler): always emit ngfactories with reexports (#18788)

Previously, we only did this when setting the `generateCodeForLibraries: false`.

This is needed so that libraries compiled with `generateCodeForLibraries: true` can be used as dependencies of other compilation units.

PR Close #18788
This commit is contained in:
Tobias Bosch
2017-08-22 16:17:44 -07:00
committed by Miško Hevery
parent 2fbc92fd2e
commit 0262e37301
3 changed files with 31 additions and 48 deletions

View File

@ -263,10 +263,7 @@ class AngularCompilerProgram implements Program {
}
private generateStubs() {
return this.options.skipTemplateCodegen ? [] :
this.options.generateCodeForLibraries === false ?
this.compiler.emitPartialStubs(this.analyzedModules) :
this.compiler.emitAllStubs(this.analyzedModules);
return this.options.skipTemplateCodegen ? [] : this.compiler.emitAllStubs(this.analyzedModules);
}
private generateFiles() {