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:
Tobias Bosch
2016-06-17 14:09:19 -07:00
parent 5c8d3154d7
commit c0f2a22a08
21 changed files with 110 additions and 112 deletions

View File

@ -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));