Angular Extended Builders

raw JSON →
21.2.0 verified Fri May 01 auth: no javascript

Angular Extended Builders (v21.2.0) extends @angular/build with custom options for esbuild plugins, index HTML transformers, and Vite dev-server middlewares. Aligns major/minor versions with Angular (21.x). Requires Node >=22 and Angular 21.2.x. Offers ESM/TypeScript plugin support, ideal for advanced Angular build customization beyond the default CLI.

error Error: Builder 'angular-extended-builder:application' not found
cause Builder not registered or package not installed
fix
Run npm install angular-extended-builder and ensure angular.json builder key matches exactly.
error Cannot find module './plugins/my-plugin.ts'
cause Path relative to workspace root, not project root
fix
Adjust path to be relative to workspace root or use absolute path.
error TypeError: plugin must be an object with 'name' and 'setup'
cause Plugin module exports default incorrectly
fix
Ensure plugin file has a default export of an esbuild Plugin object.
error Schema validation failed: data should have required property 'plugins'
cause Adding 'plugins' option without using extended builder
fix
Set builder to 'angular-extended-builder:application'.
breaking Version 21.x requires Node >=22 and Angular 21.x. Older Node or Angular will fail.
fix Upgrade Node to >=22 and Angular to 21.x.
gotcha Plugin and middleware paths in angular.json must be relative to workspace root or use absolute paths.
fix Use paths starting with './' or a full path.
gotcha Plugin modules must export a default esbuild Plugin object; named exports are not recognized.
fix Use export default { name, setup }.
breaking Version 20.x to 21.x: The Angular major bump may break compatibility; align angular-extended-builder version with Angular's.
fix Use version matching your Angular version (e.g., 20.x for Angular 20).
gotcha The $schema path in angular.json must point to the installed package's schema.json for autocomplete.
fix Add "$schema": "./node_modules/angular-extended-builder/dist/schema.json".
npm install angular-extended-builder
yarn add angular-extended-builder
pnpm add angular-extended-builder

Install the package and configure angular.json to use extended builders with plugins.

npm install angular-extended-builder --save-dev
# angular.json snippet:
# "builder": "angular-extended-builder:application",
# "options": { "plugins": ["./plugins/my-plugin.ts"], "indexHtmlTransformer": "./transform.mjs" }