mark enableProdMode
as deprecated and output a warning that it should not be used anymore
#37644
Labels
area: core
Issues related to the framework runtime
core: bootstrap
core: debug tools
P2
The issue is important to a large percentage of users, with a workaround
Milestone
angular 9.1.9
enableProdMode()
right now is a placebo. The only thing it does is removing theapp is running in dev mode
warning to the console. So if you forgot to disable it at build time but rely onenableProdMode()
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.
The text was updated successfully, but these errors were encountered: