Angular 12 ‘ng serve’ builds apps slowly, almost like production builds

The angular cli got updated with v12 to have the development environment be more like production.

Or as they like to call it:

The aim of these changes is to reduce the configuration complexity and support the new “production builds by default” initiative.

Judging by what they’ve changed, you should update your angular.json and update the projects.{PROJECT_NAME}.architect.build.defaultConfiguration path:

"defaultConfiguration": "development"

Read more here

If you did not use the ng update command, but manually updated using npm, you need to run migrations. Specifically the material styling had some changes which can cause long build times if not migrated. To trigger these migrations run:

ng update @angular/cli --migrate-only --from 11 --to 12

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)