What is @angular/compiler-cli?
The @angular/compiler-cli package provides command-line interfaces to perform Angular compilations. It is primarily used to compile Angular applications into JavaScript code that can be executed by browsers. It leverages the Angular Compiler (ngc) which is a superset of the TypeScript compiler (tsc) and includes Angular-specific metadata processing.
What are @angular/compiler-cli's main functionalities?
Ahead-of-Time (AOT) Compilation
Compiles Angular HTML and TypeScript code into efficient JavaScript code during the build process before the browser downloads and runs that code. This is the main feature of the compiler-cli which results in faster rendering, fewer asynchronous requests, smaller Angular framework download size, and better security.
ngc -p tsconfig.app.json
Incremental Builds
Supports incremental compilation by reusing the previous compilation results to speed up subsequent compilations. This feature is useful for large projects to reduce build times.
ngc --incremental
Link Time Code Generation
Processes libraries to generate Ivy-compatible code as part of the Angular Ivy compilation pipeline. This feature is used when compiling libraries with the Ivy renderer.
ngc --create-ivy-entry-points
Other packages similar to @angular/compiler-cli
typescript
The TypeScript compiler is similar to @angular/compiler-cli in that it compiles TypeScript code to JavaScript. However, it does not have Angular-specific metadata processing capabilities and is not tailored for Angular applications.
babel
Babel is a JavaScript compiler that can transform syntax, polyfill features that are missing in your target environment, and more. While it is not specific to Angular, it is often used in the JavaScript ecosystem for compiling next-generation JavaScript code down to a form that can be executed in current browsers.
webpack
Webpack is a module bundler that can also perform various optimizations and transformations on your code, including compiling TypeScript with the appropriate loader. It is more general-purpose compared to @angular/compiler-cli and is used in a wide variety of JavaScript applications, not just Angular.
20.1.0-next.3 (2025-06-25)
compiler
| Commit | Type | Description |
| -- | -- | -- |
| 0dcf230d52 | feat | add support for new binary assignment operators (#62064) |
compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| ed5062a91c | fix | add suggestion when pipe is missing (#62146) |
| d25a6a0120 | fix | handle initializer APIs wrapped in type casts (#62203) |
core
| Commit | Type | Description |
| -- | -- | -- |
| 737b35b684 | feat | Add destroyed
property to EnvironmentInjector
(#61951) |
| 36a193139a | fix | allow to set a resource in an error state (#62253) |
| c4dd258658 | fix | avoid injecting ErrorHandler
from a destroyed injector (#61886) |
| 3eee19d892 | fix | unable to retrieve defer blocks in tests when component injects ViewContainerRef (#62156) |
http
| Commit | Type | Description |
| -- | -- | -- |
| 73269cf5ce | feat | add keepalive support for fetch requests in httpResource (#61833) |
| 9791ab1b6f | feat | Add support for fetch request cache and priority options (#61766) |
language-service
| Commit | Type | Description |
| -- | -- | -- |
| 20c1f991e6 | feat | add semantic tokens for templates (#60260) |
| 5d2e85920e | feat | support to fix missing required inputs diagnostic (#50911) |
router
| Commit | Type | Description |
| -- | -- | -- |
| 9833d9ea47 | feat | Run loadComponent
and loadChildren
functions in the route's injection context (#62133) |
| 7600bec71d | fix | handle scrollRestoration error in restricted environments (#62186) |
upgrade
| Commit | Type | Description |
| -- | -- | -- |
| 900cd37f68 | fix | Make zoneless work with hybrid apps (#61660) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="20.0.5"></a>