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,9 +1,11 @@
|
||||
import {isDevMode} from '@angular/core';
|
||||
|
||||
import {DomAdapter, getDOM} from '../dom/dom_adapter';
|
||||
import {assertionsEnabled} from '../facade/lang';
|
||||
|
||||
import {sanitizeUrl} from './url_sanitizer';
|
||||
|
||||
|
||||
|
||||
/** A <body> element that can be safely used to parse untrusted HTML. Lazily initialized below. */
|
||||
let inertElement: HTMLElement = null;
|
||||
/** Lazily initialized to make sure the DOM adapter gets set before use. */
|
||||
@ -256,7 +258,7 @@ export function sanitizeHtml(unsafeHtml: string): string {
|
||||
DOM.removeChild(parent, child);
|
||||
}
|
||||
|
||||
if (assertionsEnabled() && safeHtml !== unsafeHtml) {
|
||||
if (isDevMode() && safeHtml !== unsafeHtml) {
|
||||
DOM.log('WARNING: sanitizing HTML stripped some content.');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user