The Anubhav portal was launched in March 2015 at the behest of the Hon'ble Prime Minister for retiring government officials to leave a record of their experiences while in Govt service .
The Builder API (often just called Angular CLI Builders) isn’t brand-new in Angular 21—it’s been part of the Angular CLI for years as the mechanism that executes CLI tasks like
ng build, ng serve, and ng test by delegating to “builders.” A
builder is a function that performs a task (build, test, serve, etc.) based on options and context provided by the CLI. You can also write
custom builders to extend the CLI’s capabilities.
In Angular CLI:
Builders replace older internal tooling like direct Webpack configs.
They are configured in angular.json under "architect" (or
"targets" in newer formats).
Each builder has:
An options schema that defines input.
A handler function that performs the work.
Access to a BuilderContext for reporting and scheduling tasks.
Why It Matters in Angular CLI 21
While the underlying Builder API hasn’t fundamentally changed just for v21,
Angular 21 makes greater use of it by shifting default tooling toward new, modern builders:
Default Builders Evolved
Angular CLI 21 now uses more modern builders out of the box:
Vitest-based test builder@angular/build:unit-test as the default for
ng test instead of the older Karma/Jasmine builders.
The modern application builder (often based on @angular/build:application) that uses esbuild + Vite for faster builds and dev server tasks.
These builders are implemented using the Builder API and configured in angular.json, so the CLI commands now delegate to new underlying implementations. The Builder API makes this extensible and configurable.
Custom Builders Still Supported
You can still create your own builders to:
Customize build/test/serve processes
Integrate alternative toolchains
Automate custom workflows
This is done using the Builder API utilities like createBuilder() and implementing a builder handler that returns a
BuilderOutput.
TL;DR
CLI Builder API is the core extensibility layer that Angular CLI uses to run commands like build, serve, and test.
Angular CLI 21 leverages this API to provide modern builders (e.g., esbuild/Vite-based application builder and Vitest test builder) for better performance and defaults.
You can create and use custom builders by implementing and registering them in your workspace.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
What the Builder API Is
The Builder API (often just called Angular CLI Builders) isn’t brand-new in Angular 21—it’s been part of the Angular CLI for years as the mechanism that executes CLI tasks like
ng build,ng serve, andng testby delegating to “builders.” A builder is a function that performs a task (build, test, serve, etc.) based on options and context provided by the CLI. You can also write custom builders to extend the CLI’s capabilities.In Angular CLI:
angular.jsonunder"architect"(or"targets"in newer formats).Why It Matters in Angular CLI 21
While the underlying Builder API hasn’t fundamentally changed just for v21, Angular 21 makes greater use of it by shifting default tooling toward new, modern builders:
Default Builders Evolved
Angular CLI 21 now uses more modern builders out of the box:
@angular/build:unit-testas the default forng testinstead of the older Karma/Jasmine builders.@angular/build:application) that uses esbuild + Vite for faster builds and dev server tasks.These builders are implemented using the Builder API and configured in
angular.json, so the CLI commands now delegate to new underlying implementations. The Builder API makes this extensible and configurable.Custom Builders Still Supported
You can still create your own builders to:
This is done using the Builder API utilities like
createBuilder()and implementing a builder handler that returns aBuilderOutput.TL;DR