On this page
Changelog
What changed in vite-plugin-ngp, newest first. The plugin isn't on npm, so there are no releases: this page is how you find out what landed since you last looked. Every entry links to the page that documents it.
17 October 2026#
Editing in the dev server#
- A save can no longer be undone by a module Vite read just before it: components compiled afterwards see the saved file. How it works
- Template edits reach the page about 50 ms sooner on macOS. The plugin's 50 ms wait for the rest of a save now counts from when the template was written, not from when Vite's watcher reported it, and the watcher usually reports later than that. At 1,000 components the median template edit went from 169 ms to 120 ms. How it works, Performance
- A class edit could reload the page twice, a second after the first reload. That happened when the plugin read the
.tsfile between a save truncating it and writing it. The plugin now waits out an empty read, the way Vite does. How it works DEBUG=vite-plugin-ngpalso logs how long each step of a template update took. Configuration
Performance#
- Every number on the Performance page was measured again on the current plugin, in one run on 17 October: cold starts, restarts, edits, type errors, builds and bundle sizes for all four toolchains on all four apps, instead of the 16 October run with the plugin's edit row patched in from a later one. The results barely moved, which is the point: at 5,000 components the plugin shows the first page in 1.74 s where
ng servetakes 28.3 s, a template edit lands in about 120 ms, and a build takes 20.2 s against 30.1 s. Performance - The page has a Memory section now. The generated apps were measured for memory the way the real apps are: at 5,000 components the plugin's dev server holds 1.0 GB after a restart where
ng serveholds 6.0 GB, and 1.4 GB after the edits whereng serveholds 6.6 GB. Builds are even: 5.0 GB against 5.1 GB. Performance - Both benchmark pages have figures. Each table of medians now has a chart above it, one bar per tool and app on a shared scale, with the plugin in violet and the fastest edit marked. They're drawn from the result files by
node bench/charts.mjsand follow the site's dark theme. Performance, Benchmarks on real apps
Benchmarks on real apps#
- A new page, Benchmarks on real apps: the plugin against the Angular CLI on Super Productivity and against Nx on Ghostfolio, two open-source apps, for dev-server starts, edits, production builds and memory, measured on GitHub's runners and on a laptop. On GitHub's 4-core runners the plugin restarts Ghostfolio's dev server in 4.5 s where Nx takes 21 s, updates a template in about 130–150 ms on both apps where the CLIs take 3.3–3.7 s, builds Super Productivity in 18 s where
ng buildtakes 32 s, and holds a third to a half of the CLIs' memory while you work; its cold start of Super Productivity, 21.4 s against 23.1 s, is the one number that barely moves. It also lists what each app needed to run on a per-file compiler at all. Thebench-realworkflow reruns it on demand. - Status and limits now says real apps, Linux and memory have been measured, and what still hasn't.
Internationalization#
- A translation file with a unit the parser can't read in full, such as a
{in a translation that isn't an ICU expression, no longer failsvite build. The error is logged and the build goes on, asng builddoes with the same file. Ghostfolio's Catalan translations have two such units. Internationalization
This site#
- Migrating from ng build now says where
localizeandi18nMissingTranslationgo, since i18n works. It listed them as not yet possible. - An editing pass over every page: stale counts fixed, and the Server rendering page's prerender timing remeasured on the current 14 pages. Server rendering
- The repo, push-based/vite-angular, is public. Getting started now starts with
git cloneinstead of asking for access, and no page calls the repo private any more. - Tables no longer break option names or types mid-word. The Options table puts each option's type and default in one cell so it fits the docs column, and on a phone every table with three or more columns stacks each row into labeled lines.
16 October 2026#
The first day: from an empty repo to a plugin that compiles, serves, renders, tests and type-checks Angular through ngp.
Compiling and building#
- Every
.tsmodule compiles on request with ngp's optimize mode, from the code Vite hands over, with no whole-program pass first. How it works - Angular libraries are linked, in dependency pre-bundling and in builds, so the browser never needs the JIT compiler. How it works
- The plugin defines Angular's compile-time globals (
ngDevMode,ngJitMode,ngServerMode,ngHmrMode) the way the CLI does. How it works vite buildruns Angular's build optimizer, which brings the playground's JavaScript to within 2% ofng build's. How it works- ngp builds inside the repo with one command,
pnpm toolchain, with no Rust installed beforehand. Building ngp
Editing in the dev server#
- Component HMR: an external template edit updates the running component in place, keeping its state. How it works
- A
.tsedit that only changes a component's inlinetemplateorstylesupdates in place too, with the CLI's rules for what's safe. How it works - One save that changes a component's class and its template reloads once, instead of applying a template the class can't run yet. That holds however far apart, and however often, the watcher reports the two files, as macOS's does. How it works
- Adding, renaming and deleting files compiles as a fresh build would. Deleting a file that's still used is an error until it's back, and a missing
templateUrlfile reportsNG2008instead of rendering a blank component. How it works
Styles, type-checking and tests#
- Component stylesheets (
styleUrl,styleUrls) go through Vite's CSS pipeline, so Sass, PostCSS and CSS HMR apply. Component styles - Templates and TypeScript are type-checked with TypeScript 7 over ngp's type-check blocks, in a separate process, with errors in the terminal and the overlay. New option:
typeCheck. Type-checking - Angular specs run under Vitest, compiled ahead of time with ngp. Testing with Vitest
Moving from ng build#
- New options
fileReplacements,budgetsandpolyfills, in angular.json's shapes. Replacements reach ngp's analyzer too, budgets print the CLI's messages and fail the build on errors, and zone.js apps getasync/awaitrewritten so change detection still runs after anawait. Every other build option is mapped to Vite config. Migrating from ng build
Internationalization#
- New option
i18n: Angular'si18nattributes and$localize, with a dev server in one locale and avite buildthat writes one translated folder per locale, server bundles included. Internationalization ngp-extract-i18nwrites the app's messages as XLIFF 1.2 or 2.0, XMB, JSON or ARB, likeng extract-i18n. Internationalization- The compiler reads
enableI18nLegacyMessageIdFormatandi18nNormalizeLineEndingsInICUsfromangularCompilerOptions, and the plugin definesngI18nClosureMode, so message ids matchng build's. Internationalization
Server rendering#
- New option
ssr: pages render on the server in the dev server, andvite buildbuilds a server bundle beside the browser one. Server rendering - Server builds bundle and link every Angular library in your
dependencies. Server rendering
Performance#
- The first end-to-end numbers, against
ng serve, Analog and@oxc-angular/vite: at 5,000 components the plugin shows the first page in 1.9 s whereng servetakes 28.5 s, and a template edit in about 150 ms whereng servetakes 1.8 s. The harness is in the repo'sbench/folder. Performance
This site#
- Docs at https://push-based.github.io/vite-angular/, built with the plugin itself and prerendered with Angular SSR. They redeploy on every push.
- Dark theme, copy buttons, heading links, the file name on each snippet, and
llms.txtfor AI assistants.