@@ -6,6 +6,8 @@
|
6 | 6 | * found in the LICENSE file at https://angular.io/license |
7 | 7 | */ |
8 | 8 | |
| 9 | +import {global} from './global'; |
| 10 | + |
9 | 11 | /** |
10 | 12 | * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`. |
11 | 13 | * |
@@ -44,5 +46,12 @@ export function enableProdMode(): void {
|
44 | 46 | if (_runModeLocked) { |
45 | 47 | throw new Error('Cannot enable prod mode after platform setup.'); |
46 | 48 | } |
| 49 | + |
| 50 | +// The below check is there so when ngDevMode is set via terser |
| 51 | +// `global['ngDevMode'] = false;` is also dropped. |
| 52 | +if (typeof ngDevMode === undefined || !!ngDevMode) { |
| 53 | +global['ngDevMode'] = false; |
| 54 | +} |
| 55 | + |
47 | 56 | _devMode = false; |
48 | 57 | } |