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,7 +1,6 @@
import {ApplicationRef, DebugNode, NgZone, RootRenderer, getDebugNode} from '@angular/core';
import {ApplicationRef, DebugNode, NgZone, RootRenderer, getDebugNode, isDevMode} from '@angular/core';
import {DebugDomRootRenderer} from '../../../core_private';
import {assertionsEnabled} from '../../facade/lang';
import {getDOM} from '../dom_adapter';
import {DomRootRenderer} from '../dom_renderer';
@ -24,7 +23,7 @@ export function inspectNativeElement(element: any /** TODO #9100 */): DebugNode
}
function _createConditionalRootRenderer(rootRenderer: any /** TODO #9100 */) {
if (assertionsEnabled()) {
if (isDevMode()) {
return _createRootRenderer(rootRenderer);
}
return rootRenderer;