Angular15 cancels the environment.prod.ts file by default.
How do I distinguish between dev and prod?
CodePudding user response:
import { isDevMode } from '@angular/core';
if(isDevMode()) {
console.log('Your app is running in dev mode', isDevMode())
}
CodePudding user response:
Is true that environment.prod.ts
is not generated by default, Angular let you the responsibility to configure them as you like. For example, if you need any polyfill, you’ll need to add it yourself. So u still can add environment.prod.ts
or any other type of environments.