1.6 s
from starting the dev server, every cache deleted, to the first page of a 5,000-component app, where ng serve takes 28.4 s
Performance: Starting the dev serverVite plugin · Angular 22 · ngp
With vite-plugin-ngp, the dev server compiles only the Angular files a page asks for, so a 5,000-component app shows its first page in 1.6 seconds, where ng serve takes 28.4. The code still comes from Angular's own template compiler, and your templates and TypeScript are still type-checked, in a background process. Underneath is ngp, the Rust-and-TypeScript preprocessor Angular merged on 8 October 2026.
npm create @push-based/ngp@latestpnpm create @push-based/ngpyarn create @push-based/ngpbun create @push-based/ngpvp create @push-based/ngpAlready have an Angular app? Getting started moves it to Vite.
Measured
Two runs of the benchmark in the repo's bench/ folder, on different machines and months apart. Compare the plugin with the CLI inside a run, not one run's numbers with the other's.
1.6 s
from starting the dev server, every cache deleted, to the first page of a 5,000-component app, where ng serve takes 28.4 s
Performance: Starting the dev server100–130 ms
from saving a template to the update in the page, in place, at 100 to 5,000 components, where ng serve takes 1.8 s at 5,000
Performance: Template edits0.9 GB
held by the dev server once the page has rendered after a restart, at 5,000 components, where ng serve holds 4.7 GB
Performance: MemoryWithin 3%
of ng build's production JavaScript, gzipped, at every size. The initial chunk is 16 kB larger at 5,000 components
Performance: Bundle size Medians, measured end to end in headless Chrome on an Apple M2 Max, on the plugin at commit e401c10, against ng serve, Analog and @oxc-angular/vite on the same Angular.
@oxc-angular/vite restarts faster still, at about 0.3 s, and uses less memory, but it doesn't type-check and uses its own compiler.
They predate the linker over oxc, on 9 November, and the ngp built from Angular 22.3.2, on 2 December. The generated apps haven't been measured since.
How they were measured4.3 s
to restart Ghostfolio's dev server and paint its first page, where Nx takes 21 s
Benchmarks: Starting the dev server15 s
to restart Super Productivity's, where ng serve takes 27 s. Its cold start gains least: 21 s against 27
Benchmarks: Starting the dev server130–190 ms
from saving a template to the update in the page, in place, on both apps, where the CLIs take 3.5 to 4.5 s
Benchmarks: EditingMedians of 5 starts and 10 edits in one workflow run: Super Productivity, 252 components with Material and NgRx, against the Angular CLI, and Ghostfolio, an Nx monorepo of 157, against Nx. Benchmarks on real apps.
Setup
Install the package and Vite. The package carries its own ngp, built from Angular's source, so there's nothing else to build or point it at. Add ngp() to vite.config.ts, put your index.html in the project root with a script tag for src/main.ts, keep main.ts as ng new wrote it, and run npx vite. The same transform runs in production builds and in server rendering: this site is an Angular app compiled by the plugin and prerendered with Angular SSR.
npm install -D @push-based/vite-plugin-ngp vite@8.3.4// vite.config.ts
import {defineConfig} from 'vite';
import {ngp} from '@push-based/vite-plugin-ngp';
export default defineConfig({
plugins: [ngp()],
});What works
The plugin does more than serve. Each of these works today, and its page says how it was checked.
Templates and TypeScript, checked with TypeScript 7 in a separate process. Errors show in the terminal and Vite's overlay, and fail vite build.
styleUrl files go through Vite's CSS pipeline, so Sass, Less and PostCSS work, with Angular's view encapsulation. Edits update in place.
Specs compiled ahead of time, run in Node on the server platform's DOM, on jsdom, or in Chromium through browser mode. A run compiles only the specs it runs.
@angular/ssr as ng new --ssr lays it out, with render modes, status codes and prerendering in vite build. Or a render function of your own.
i18n attributes and $localize, extraction with ngp-extract-i18n, and one translated folder per locale from a single build.
ngp-generate writes components, services, pipes, guards and the rest as ng generate names them, with Vitest specs. A test builds and runs one of each.
create-ngp --monorepo puts the app in apps/web next to a library in libs/ui, compiled from source through tsconfig paths. Built, prerendered and tested in CI.
One app at a time, its libraries compiled from source through tsconfig paths. Checked on Ghostfolio, an Nx 23 workspace.
vp create, vp dev, vp build and vp test on an app made or moved with Vite+, server rendering and per-locale builds included.
fileReplacements, budgets and polyfills keep their angular.json names and shapes. The page says where every other build option goes.
Not everything an ng build app uses has moved: inline styles are plain CSS, there's no service worker or critical CSS inlining, and libraries you publish stay on ng-packagr. Status and limits lists what doesn't work yet.
How it works
The browser requests a .ts file, and Vite hands its code to the plugin.
ngp's Rust analyzer answers for that file alone, and Angular's own template compiler generates its code.
The plugin returns TypeScript and a source map. Vite strips the types, and other plugins see ordinary modules.
Compared
Four ways to run an Angular app in development. Two compile each file when Vite asks for it, and @oxc-angular/vite does it faster than this plugin.
Its opt-in fastCompile compiles per file, after a scan of every file, with its own compiler on @angular/compiler, and doesn’t type-check.
Where this plugin loses. On generated apps, @oxc-angular/vite beat it on every timing but the typical template edit, where they tied, and held a quarter of its memory. What you give up for that is Angular's own compiler, template type-checking and a chunk of its own for each @defer block. And to ship an app today, use the Angular CLI.
Analog 2.8.1 and @oxc-angular/vite 0.0.41 were checked in their source and docs on 17 October 2026, and both change fast. The timings are from one laptop on the same day. Compared with alternatives has the sources, and Performance the numbers.
Try it
One command writes ng new's app on Vite, with routing, a spec and its size budgets, and installs nothing until you do.
npm create @push-based/ngp@latestpnpm create @push-based/ngpyarn create @push-based/ngpbun create @push-based/ngpvp create @push-based/ngp