fix(perf): support prod mode again
After splitting the facades into multiple modules, enabling prod mode for code had no effect for the compiler. Also in a change between RC1 and RC2 we created the `CompilerConfig` via a provider with `useValue` and not via a `useFactory`, which reads the prod mode too early. Closes #9318 Closes #8508 Closes #9318
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import {PLATFORM_INITIALIZER, Provider, ReflectiveInjector, Type} from '../index';
|
||||
import {lockRunMode} from '../src/application_ref';
|
||||
import {ListWrapper} from '../src/facade/collection';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {FunctionWrapper, isPresent} from '../src/facade/lang';
|
||||
@ -33,6 +34,7 @@ export class TestInjector {
|
||||
}
|
||||
|
||||
createInjector() {
|
||||
lockRunMode();
|
||||
var rootInjector = ReflectiveInjector.resolveAndCreate(this.platformProviders);
|
||||
this._injector = rootInjector.resolveAndCreateChild(
|
||||
ListWrapper.concat(this.applicationProviders, this._providers));
|
||||
|
Reference in New Issue
Block a user