DEV Community

Tips for optimizing the build process of an Angular application.

Balaji on October 30, 2023

Introduction Angular is a popular and powerful framework for building web applications, but as your project grows, it can become chall...
Collapse
 
melroy89 profile image
Melroy van den Berg

--aot is by default. right? So no need to give this flag.

Collapse
 
melroy89 profile image
Melroy van den Berg

Also.. ng build --prod, the --prod flag doesn't exists anymore. I think it's just ng build now.

Collapse
 
balajipatnam profile image
Balaji

Yes, you're correct. As of Angular 8, the --aot flag is enabled by default for production builds, so there's no need to provide it explicitly.

And starting from Angular 12, the --prod flag has been deprecated. Can now use ng build for a production build. The Angular CLI understands that it's a production build based on the configuration in your angular.json file.

Updated now Thank you!.