From 489dca24528ccd59ffbe99c53df5c71eb252b01f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 20 Sep 2022 09:41:46 +0000 Subject: [PATCH] fixup! fix(core): update `isDevMode` to rely on `ngDevMode` --- packages/core/src/util/is_dev_mode.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/core/src/util/is_dev_mode.ts b/packages/core/src/util/is_dev_mode.ts index d1072d1a3a98b..e6d3c71794ec6 100644 --- a/packages/core/src/util/is_dev_mode.ts +++ b/packages/core/src/util/is_dev_mode.ts @@ -11,7 +11,9 @@ import {global} from './global'; /** * Returns whether Angular is in development mode. * - * By default, this is true, unless a user calls `enableProdMode` before calling this. + * By default, this is true, unless `enableProdMode` is invoked prior to calling this method or the + * application is built using the Angular CLI with the `optimization` option. + * @see {@link guicli/build ng build} * * @publicApi */ @@ -27,6 +29,10 @@ export function isDevMode(): boolean { * does not result in additional changes to any bindings (also known as * unidirectional data flow). * + * Using this method is discouraged as the Angular CLI will set production mode when using the + * `optimization` option. + * @see {@link guicli/build ng build} + * * @publicApi */ export function enableProdMode(): void {