Configuring the Angular Compiler (ngc)

The Angular Compiler (ngc) transforms your templates into optimized JavaScript ahead-of-time. You tune it in `tsconfig.json` to create smaller production builds or publish reusable libraries.
Think of the Angular Compiler (ngc) as a specialized build tool you tune via `angularCompilerOptions`. It transforms your templates into highly optimized JavaScript before they reach the browser (AOT compilation). You configure it to create smaller production builds ('full' mode) or to publish libraries compatible with different Angular versions ('partial' mode). A common footgun is building a library in 'full' mode, which can cause version conflicts for consumers; always use 'partial' mode for distributed libraries.
Read the original → angular.dev
- #angular
- #compiler
- #build-tools
- #aot
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.