npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

angular-extended-builder

v21.2.0

Published

Angular extended builders with custom options for esbuild and Vite

Downloads

304

Readme

Angular Extended Builder

Forked/inspired by angular-builders

Custom Angular builders that extend @angular/build with support for esbuild plugins, index HTML transformers, and Vite dev-server middlewares.

Installation

npm install angular-extended-builder --save-dev
# or
pnpm add -D angular-extended-builder

Setup

  1. Update your angular.json to use the extended builders:
{
	"$schema": "./node_modules/angular-extended-builder/dist/schema.json",
	"projects": {
		"my-app": {
			"architect": {
				"build": {
					"builder": "angular-extended-builder:application",
					"options": {
						"plugins": ["./plugins/my-esbuild-plugin.ts"],
						"indexHtmlTransformer": "./plugins/index-html-transform.mjs",
						// ... your existing build options
					},
				},
				"serve": {
					"builder": "angular-extended-builder:dev-server",
					"options": {
						"middlewares": ["./plugins/my-middleware.ts"],
					},
				},
			},
		},
	},
}
  1. The $schema path enables IDE autocomplete and validation for the extended options.

Builders

| Name | Extended Options | | ----------- | ------------------------------------------------ | | application | schema.json | | dev-server | schema.json |

How to

Esbuild Plugins

Add a plugins array in your angular.json at projects.<name>.architect.build.options. Each entry is a path to an ESM/TypeScript module that exports an esbuild plugin:

// plugins/my-plugin.ts
import type { Plugin } from "esbuild"

export default {
	name: "my-plugin",
	setup(build) {
		build.onResolve({ filter: /\.custom$/ }, (args) => {
			return { path: args.path, namespace: "custom" }
		})
	},
} satisfies Plugin

Plugins can also be referenced as npm package names.

Examples: projects/app/plugins

Index HTML Transformer

Add an indexHtmlTransformer path in your angular.json at projects.<name>.architect.build.options. The module should export a default function that receives the HTML string and returns a transformed HTML string:

// plugins/index-html-transform.mjs
export default function transform(html) {
	return html.replace("{placeholder}", "value")
}

Example: projects/app/plugins/index-html-transform.mjs

Dev Server Middlewares

Add a middlewares array in your angular.json at projects.<name>.architect.serve.options. Each entry is a path to a module that exports a Vite-compatible middleware function:

// plugins/my-middleware.ts
import type { IncomingMessage, ServerResponse } from "node:http"

export default function middleware(
	req: IncomingMessage,
	res: ServerResponse,
	next: (err?: unknown) => void,
) {
	// Handle request or call next()
	next()
}

Version Compatibility

The major and minor version of this library aligns with the supported Angular version:

| angular-extended-builder | Angular | Node.js | | ------------------------ | ------- | ------- | | 21.x | 21.x | >= 22 | | 20.x | 20.x | >= 20 |

Patch releases contain bug fixes and enhancements only. Major and minor releases follow Angular's release cycle.