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,8 +1,10 @@
|
||||
import {isDevMode} from '@angular/core';
|
||||
|
||||
import {getDOM} from '../dom/dom_adapter';
|
||||
import {assertionsEnabled} from '../facade/lang';
|
||||
|
||||
import {sanitizeUrl} from './url_sanitizer';
|
||||
|
||||
|
||||
/**
|
||||
* Regular expression for safe style values.
|
||||
*
|
||||
@ -81,7 +83,7 @@ export function sanitizeStyle(value: string): string {
|
||||
return value; // Safe style values.
|
||||
}
|
||||
|
||||
if (assertionsEnabled()) getDOM().log('WARNING: sanitizing unsafe style value ' + value);
|
||||
if (isDevMode()) getDOM().log('WARNING: sanitizing unsafe style value ' + value);
|
||||
|
||||
return 'unsafe';
|
||||
}
|
||||
|
Reference in New Issue
Block a user