fix(ivy): don't load factories when using Ivy (#28685)
Related to https://github.com/angular/angular/pull/26947/files#r251221208 Related to angular/angular-cli#13524 PR Close #28685
This commit is contained in:

committed by
Alex Rickabaugh

parent
b0578061ce
commit
bc6c671e6b
@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
import {Injectable, Optional} from '../di';
|
||||
import {ivyEnabled} from '../ivy_switch';
|
||||
|
||||
import {Compiler} from './compiler';
|
||||
import {NgModuleFactory} from './ng_module_factory';
|
||||
@ -56,8 +57,8 @@ export class SystemJsNgModuleLoader implements NgModuleFactoryLoader {
|
||||
}
|
||||
|
||||
load(path: string): Promise<NgModuleFactory<any>> {
|
||||
const offlineMode = this._compiler instanceof Compiler;
|
||||
return offlineMode ? this.loadFactory(path) : this.loadAndCompile(path);
|
||||
const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;
|
||||
return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);
|
||||
}
|
||||
|
||||
private loadAndCompile(path: string): Promise<NgModuleFactory<any>> {
|
||||
|
Reference in New Issue
Block a user