-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
angular 9.1.9
enableProdMode() right now is a placebo. The only thing it does is removing the app is running in dev mode warning to the console. So if you forgot to disable it at build time but rely on enableProdMode() to be working, your app runs in dev mode with a rather big performance hit.
You could print a warning, that enableProdMode() is deprecated and won't work and that dev mode can only be disabled at build time (or do (window as any).ngDevMode = false; as workaround). Or restore its functionality, if this is not intended.
Reproduction: https://angular-ivy-bjsurx.stackblitz.io/ | see main.ts, enableProdMode() is called
Open devtools and set a breakpoint anywhere where ngDevMode is used, and observe it not being falsy. Or look at the DOM and see debug attributes & comments.

