On this page

Changelog

What changed in vite-plugin-ngp, newest first, written for people using it. Every entry links to the page that documents it. Versions on npm, with the commits in each, are in the repo's CHANGELOG.md and its GitHub releases. To follow it in a feed reader, subscribe to changelog.xml.

4 December 2026#

Fixes#

  • Editing the template of a component outside Vite's root, like a library's in libs/ next to the app in apps/web, now updates the page in place. Before, the edit did nothing: Vite only watches its root, and the plugin never told it about the template. A server.watcher.add() you added for this can go. Under vitest in watch mode, the same edit reruns the component's specs. How it works
  • An app whose package.json sits above Vite's root, like apps/web in a monorepo with one package.json at the top, now gets @angular/ssr's rendering and prerendering, and has its Angular libraries bundled and linked on the server and under Vitest. Before, the plugin read only a package.json in the root itself, found none, and fell back to the render contract with no libraries. It now takes the nearest one, as Node does. Server rendering

New apps#

  • create-ngp --monorepo puts the app, app or app-ssr, in apps/web of a monorepo, next to a library in libs/ui that the app imports by a path alias and compiles from source. One package.json at the top holds every dependency, npm test runs every project's specs, and ngp-generate library <name> adds more libraries. The scaffolder asks for the layout, or takes the flag. Creating an app

Generating code#

  • ngp-generate writes a component, service, directive, pipe, guard, interceptor or resolver into your app, as ng generate does: npx ngp-generate c user-card. File names and code follow the Angular CLI's own schematics, with specs for Vitest. It needs no angular.json, and comes with the plugin, so you don't install anything else. Vite has no generators of its own, and Vite+'s only write new packages into a monorepo. Generating code
  • ngp-generate c orders --route orders adds a lazy route to the new component in app.routes.ts. Generating code
  • In a library, ngp-generate adds what it writes to the library's src/index.ts, so an app can import it at once. --no-export skips that. Generating code
  • ngp-generate application admin adds a second app to a monorepo, in apps/admin, with dev:admin, build:admin and preview:admin scripts. Generating code
  • ngp-generate library cart adds a library to a monorepo from create-ngp --monorepo: libs/cart, with a component, a spec and an index, and @<scope>/cart mapped in tsconfig.base.json. Generating code

Type-checking#

  • With pnpm 11 and later, including the pnpm 12 that Vite+ installs with, installing the plugin no longer warns about an unmet typescript peer. The plugin used to depend on TypeScript 7 under an alias, and pnpm counted that as the plugin's TypeScript. Now it installs only TypeScript 7's binary for your platform, from @typescript/typescript-<platform>-<arch>, and runs it without starting Node first, which made each check start about 40 ms sooner on a MacBook. An install without optional dependencies gets one type-check error naming the missing package. Type-checking

Vite+#

  • Specs run under vp test on jsdom and in Chromium through Vitest's browser mode, not only in Node on the server platform. Two things change from plain Vitest: the setup file imports from vite-plus/test, and the Playwright provider from vite-plus/test/browser-playwright, at the Vitest version Vite+ bundles. vp migrate makes both changes on an app that had the setups. CI now runs the app template's spec both ways after vp migrate. Using Vite+
  • One app in a new Nx 24.1 workspace runs under Vite+: vp build, vp test and vp dev, and nx build, nx test and nx dev. nx serve fails with vite: command not found until the app gets a serve script. The Vite+ page no longer lists vp pack as untried: it builds libraries, which the plugin doesn't, with or without Vite+. Using Vite+

Windows#

  • On Windows the plugin no longer tells you to set engine: 'wasm' when it finds no native engine. CI now runs the plugin on Windows with the wasm engine, and vite build fails there before compiling anything, so the message says to run under WSL 2 instead. Windows itself doesn't work yet; the page says what fails and what would fix it. Status and limits

Docs#

  • A new Tutorial walks you through the plugin on a fresh app: a template edit that keeps the page's state, a class edit that reloads, a planted type error in the terminal and the overlay, then the spec and the build, with what you should see after each step. Tutorial
  • The Comparison page gave the plugin's version as 0.2.0. It now says 0.4.4 and the whole range it accepts, Angular 22.3.0-rc.0 up to, not including, 22.4.0. Compared with alternatives
  • Getting started installs with npm and now runs with npx vite to match, where it said pnpm vite. Its index.html links your global stylesheet, so a moved app keeps its global styles. Getting started
  • The Performance page now says up front that its figures are from 17 October 2026 and predate the oxc linker and the ngp built from 22.3.2, and points to the newer run on real apps. Performance
  • Every option on the Configuration page, cache.dir, ssr.allowedHosts and the other nested ones included, now has its own heading: its type, its default, what it does, when to change it, and an example where one helps. The table of contents and a link can now land on one option, and the table at the top links each name to its section. The entries default now names the @angular/ssr server, src/server.ts, which the plugin has always added and the page left out. Configuration
  • Migrating from ng build now covers what an app needs beyond its build options. ng serve's options each have their Vite setting, from proxyConfig to liveReload, with what changes in a proxy file. The scripts in package.json, src/index.html and the test target each say what they become. A new section has the per-file fixes the Benchmarks apps needed, each with what you see, why and the fix: type-only re-exports, decorator metadata, TypeScript transformers, TypeScript 7's stricter checks and template errors ngc doesn't report. The page also says what to read in which order, and Getting started's next steps start with it. Migrating from ng build
  • The Nx page sets resolve: {tsconfigPaths: true} instead of a function that turns tsconfig.base.json's paths into aliases. Run on Ghostfolio with the root at apps/client, it built the same files byte for byte. Nx workspaces
  • A new Troubleshooting page explains the plugin's errors and warnings, and the Angular, Rolldown, TypeScript and Yarn messages you meet because of it, each under a heading you can search for, with what to do. The page ends with how to make a minimal reproduction and file a bug. Configuration's table of startup errors moved there. Troubleshooting
  • A new Troubleshooting page explains the plugin's errors and warnings, and the Angular, Rolldown, TypeScript and Yarn messages you meet because of it, each under a heading you can search for, with what to do. The page ends with how to make a minimal reproduction and file a bug. Configuration's table of startup errors moved there. The plugin's messages that have an entry now end with a link to it. Troubleshooting
  • The home page no longer opens with "a prototype on a prototype" or tells you not to ship with it. It keeps the two facts that still hold: the plugin accepts Angular 22.3 only, and carries its own ngp build made from Angular's source. The Comparison page no longer says the plugin works with one Angular prerelease or that you build ngp yourself. Status and limits
  • The home page's Setup section said to point the plugin at your ngp build. The package carries its own, so it now says what you do: install the package, add ngp(), put index.html in the project root, keep main.ts, and run npx vite. The snippet beside it starts with the install command. Getting started
  • The home page's What works section has two more cards: Generating code, for ngp-generate, and A monorepo, for create-ngp --monorepo. Generating code
  • The home page has a What works section: a card for each of type-checking, component styles, Vitest, server rendering, i18n, Nx, Vite+ and migrating from ng build, each linking its page, and a link to what doesn't work yet. Status and limits
  • The home page's Measured section now says which run each number comes from. The generated apps' cards carry their date, 17 October 2026, their Angular, 22.3.0-next.2, and the laptop, and note that they predate the oxc linker and the ngp built from 22.3.2. Next to them is the restart chart from the Performance page. Two weak cards are gone: "Identical" output and "In place" edits make way for dev-server memory, 0.9 GB where ng serve holds 4.7 GB at 5,000 components, and production bundles within 3% of ng build's. Below them, a separate block gives the real-app figures from 2 December on GitHub's runners: Ghostfolio restarts in 4.3 s where Nx takes 21, Super Productivity in 15 where ng serve takes 27, and a template edit lands in 130 to 190 ms where the CLIs take 3.5 to 4.5 s. Every card links the section it comes from. Performance, Benchmarks on real apps
  • The home page starts with what you get, a dev server that compiles only what the page asks for, with Angular's own compiler and type-checking kept, and gives ngp's history second. Under it, and again at the end of the page, is the command that creates an app, with a tab for npm, pnpm, Yarn, bun and Vite+ and a copy button. On a phone the hero drops its logo, so the command and the buttons sit on the first screen. Creating an app
  • The home page now has a short "When to use which" next to ng serve, Analog and @oxc-angular/vite: when each compiles, whose compiler, whether it type-checks templates, and when to pick it. It says where the plugin loses: @oxc-angular/vite was faster and lighter on the generated apps, and the Angular CLI is still what to ship. Compared with alternatives
  • Every docs page now ends with two links to GitHub. "Edit this page" opens the page's markdown in GitHub's editor, so a typo fix is a pull request away. "Report a problem" opens a new issue already titled with the page's name, its address in the body, and the documentation label; say what's wrong and what you expected. There's no "Was this helpful?" button: a yes or no doesn't say what to fix. Getting started shows them at the end, as every page does.

2 December 2026#

Angular#

  • The ngp build the plugin carries is now made from Angular 22.3.2, the latest stable release, in place of 22.3.0-rc.0. The package brings its own ngp, so an app on 22.3.2 was still compiled by the release candidate's. The rebuild brings what Angular changed in ngp since then. It's a short list: ngp resolves typeof import('…').Name in a library's .d.ts, which TypeScript writes for a re-exported as const array; @defer no longer gets a warning for prefetch when with another expression than its main when; and the analyzer caches module resolutions. Diagnostics read as before, with their code once. Fixes in @angular/compiler itself were never held back: ngp loads the one your app installs. The Angular releases the plugin accepts haven't changed. Compatibility
  • The range was measured again with the new build, and it stays 22.3.0-rc.0 up to, not including, 22.4.0: nobody has to move Angular to take the next plugin release. On 22.3.0-rc.0, 22.3.0 and 22.3.2, all 177 of the plugin's tests and the playground's 33 specs pass and the playground builds, and Ghostfolio and Super Productivity build on 22.3.2. 22.2.7 still fails when ngp loads. The page no longer says Angular keeps patches to fixes: that isn't true of ngp, and it says what the upper end rests on instead. Compatibility

Benchmarks#

  • The real-app benchmarks ran again, on Angular 22.3.2 and the plugin with its rebuilt ngp, on GitHub's runners and on a laptop. The plugin restarts Ghostfolio's dev server in 4.3 seconds where Nx takes 21, and Super Productivity's in 15 where ng serve takes 27; builds take 18 seconds against 26 and 26 against 49. Every time is longer than in October's run for both tools, mostly because the runners were slower machines. One thing got worse on its own: on Super Productivity the plugin's dev server lost ground to ng serve since October, on the runners and on a laptop, and the cause isn't found. The ngp rebuild isn't it. Benchmarks

New apps#

  • Apps from create-ngp now set the two size budgets ng new sets: vite build warns when the initial bundle passes 500 kB or a component stylesheet passes 4 kB, and fails past 1 MB and 8 kB. Before, the templates set none, so an app could outgrow ng new's limits without a word. They're in vite.config.ts, to change or delete. Creating an app
  • yarn create @push-based/ngp works with Yarn 2 and later. It stopped with ENOTDIR before writing the app, because Yarn runs the scaffolder from a zip file and the scaffolder copied its templates in a way Yarn's zip support doesn't cover. Apps it writes also carry a .yarnrc.yml with nodeLinker: node-modules: under Yarn's default, Plug'n'Play, the first build failed with 'router-outlet' is not a known element, because ngp's analyzer can't read Angular's packages from zip files. Plug'n'Play stays unsupported for apps you set up yourself. Status
  • npm create @push-based/ngp now writes an app on Angular 22.3.2 instead of the release candidate. The app-ssr template pins @angular/ssr to 22.3.0, on purpose: the Angular CLI releases that package, and 22.3.0 is its newest 22.3 release. Creating an app

Docs#

  • A new page, Creating an app, covers create-ngp on its own: the command for npm, pnpm, Yarn, bun and Vite+, every option, what the scaffolder changes in the template, each file both templates write and why, and how to upgrade the plugin and Angular afterwards. Using Vite+ keeps what's particular to vp create.
  • Configuration now covers what you'd look up: a table for each nested option (ssr, i18n, test and budgets), what the package exports, extractMessages() included, the environment variables the plugin reads, the Vite settings it reads, and every message it stops with when an option is wrong. Configuration
  • Vitest reads vitest.config.ts instead of vite.config.ts, so an option you set only in vite.config.ts, such as fileReplacements, doesn't reach your specs. Apps from create-ngp have both files. Configuration now says how to share the options with mergeConfig or one file, and which options behave differently under Vitest. Its first example now lists every option with its real default. Configuration

27 November 2026#

Fixes#

  • withEventReplay() now works. Clicks made before the app hydrated were lost, in the dev server and in builds, with @angular/ssr and with render alike: Angular's server renderer only sets replay up when the document it renders into holds Angular's event dispatch contract script, which the Angular CLI adds at build time and the plugin didn't. The plugin now adds it, right after <body>, to the document the server renders into, and leaves the browser's index.html without it. With @angular/ssr and in the dev server there's nothing to change. With a render function, vite build writes the document as dist/server/index.server.html, one per locale with i18n: pass that to render in place of dist/client/index.html, or your build keeps losing early clicks. Server rendering
  • A dev server that renders pages with a render(url, document) entry could answer its first page with a 500: ENOENT: no such file or directory, rename ...tsconfig.entry.<hash>.json.<pid>.tmp. The first request starts the browser's compiler and the server's together. Both wrote the tsconfig the analyzer reads through one temporary file, and the second to move it into place found it gone. The compiler that lost stayed failed, so pages, or the browser's modules, kept failing until a restart. How often it happened depended on timing: a test that fetches one page from a fresh dev server failed in four of five runs of the plugin's test suite. Each write now has a temporary file of its own. How it works

26 November 2026#

Server rendering#

  • ssr: true now runs @angular/ssr when your app depends on it, with the files ng new --ssr writes: an Express server.ts on AngularNodeAppEngine, main.server.ts exporting the bootstrap function, and server routes. Prerender, Server and Client render modes, status codes and redirects work in the dev server and from the built dist/server/server.js, and vite build prerenders, calling getPrerenderParams. Before, server rendering meant a render(url, document) function and a server you wrote, with no status codes; apps without @angular/ssr still work that way. New ssr.server and ssr.allowedHosts options. @angular/ssr with i18n isn't supported yet. Server rendering, Configuration
  • The app-ssr template of create-ngp now scaffolds that setup in place of its server.mjs: npm start runs node dist/server/server.js, and every route is prerendered to start with. Using Vite+

Output cache#

  • cache: {dir: 'path'} names the directory the output cache lives in, so every project of a workspace can use the same one. Under Vitest each project had its own, and linked every Angular library for itself. With one directory, a library one project linked is read by the others. Your own compiled modules stay per project, as before, and no cache key changed. It's a small saving on its own: about 0.1 s for a project Vitest has never run, in the case measured. cache: true and cache: false work as they did. Configuration, How it works, Nx
  • workspaceRoot lets the projects of a workspace share the modules they compile, not only linked libraries. ngp writes a class's file into compiled code as a path from the folder of the project's tsconfig, so a library file two projects import compiled to different code in each. With workspaceRoot the path starts at the workspace root, and projects on one cache.dir whose compiler options are the same compile the file once. Projects with different template checks still compile for themselves. The cache key no longer holds where a tsconfig is or its outDir, so every cache misses once after the update. Configuration, How it works
  • test: {externalLibraries: true} leaves Angular's libraries to Node under Vitest and links each one as it loads, from the output cache. Before, Vitest transformed every inlined library once per project, after the plugin, so a workspace with many projects paid for the libraries in every one. On the plugin's fixture a project Vitest has never run takes 0.34–0.39 s with it, against 1.05–1.13 s. vi.mock then reaches a library only where your own code imports it, and the pool has to be forks or threads. Off by default. Testing, Configuration

25 November 2026#

Angular#

  • The plugin now accepts every Angular 22.3 release from 22.3.0-rc.0 on, 22.3.0 included, instead of exactly 22.3.0-rc.0. Before, an app on 22.3.0 got a peer dependency conflict on install, and the docs told you to pin a release candidate. Older releases still fail when ngp loads, and 22.4 stays out until it has been run. The new page has the range for each plugin version and the runs behind it. Compatibility

New apps#

  • npm create @push-based/ngp, or vp create @push-based/ngp with Vite+, scaffolds an Angular app on the plugin: the app Getting started describes, with routing, a Vitest spec on the server platform, and an app-ssr template that renders on the server and hydrates. The scaffolder is a new package, @push-based/create-ngp, released with the plugin at the same version, and it pins the plugin and Angular to the versions released together. Using Vite+

Testing#

  • A new test option holds behaviour for specs written for TestBed under JIT. Its first switch, jitCompat, makes TestBed.overrideComponent and the other overrides work for components that import an NgModule, from a library or your app: libraries are linked in JIT mode and ngJitMode is true, under Vitest only. Before, the overridden template saw nothing from the NgModule, and *ngIf from CommonModule failed with NG0303. jitCompat also keeps @defer dependencies as static imports, so a component that defers one has its metadata without compileComponents(), and ng-mocks can mock it. Off by default, so existing setups compile as before. Testing, Configuration
  • A second switch, test.extendedDiagnostics: 'warning', reports Angular's extended diagnostics as warnings in specs, even when your tsconfig sets one or all of them to error. Before, an unused standalone import in a component failed every spec file that imported it. Builds and the dev server still report them as configured. Testing
  • A third switch, test.runtimeScopes, drops the template scope errors TestBed resolves at runtime: NG8001 to NG8004 in non-standalone components and components declared in a spec file, and NG8008 in spec-declared test hosts. Before, a component that gets its scope from TestBed.configureTestingModule({declarations}) failed its spec file at compile time. Standalone components outside spec files keep every error. Testing

Fixes#

  • The output cache now misses when ngp's preprocessor changes. Its key named the Angular commit the package's ngp was built from, so a patched preprocessor in node_modules, or a local build of ngp, kept getting output it no longer generates. The key now hashes every .js file of the preprocessor, about 50 files. After updating, the first build or test run compiles everything once. How it works
  • In the dev server, Angular libraries are now linked in server environments the plugin doesn't own, such as the Worker environment @cloudflare/vite-plugin adds. The dev server used to stop on startup asking for the JIT compiler, because that environment pre-bundled the libraries without the linker, and the transform skipped libraries served with a ?v= query. vite build was not affected. How it works, Server rendering
  • Under pnpm 11 and later, which Vite+ installs with, a template type error made vite build and vp build fail with "Cannot read properties of undefined (reading 'Latest')" instead of reporting the error, and a .ts edit in the dev server hit the same error. pnpm linked the TypeScript 7 the plugin carries for its type-check under the name typescript inside the plugin. The plugin now parses with the TypeScript @angular/compiler-cli uses, your TypeScript 6. Using Vite+
  • An extended diagnostic in an external template, such as NG8109 for an uninvoked signal in counter.html, no longer breaks the component under the dev server or Vitest. Vite read the template offset as one into the .ts module, so the frame showed the wrong line, and an offset past the module's end threw and failed the module over a warning. The message now starts with the template's path:line:column, and a warning stays a warning. Type-checking

Docs#

  • Using Vite+ now covers moving an existing app with vp migrate, including the esbuild install script pnpm 11 and later stop on, what vp check, vp test and vpx ngp-extract-i18n do with an Angular app, and server rendering under vp dev and vp build. CI runs both templates under Vite+ on every change.

17 November 2026#

Angular#

  • The plugin moved from Angular 22.3.0-next.4 to 22.3.0-rc.0, and the ngp it carries is built from the commit that release was cut at. Move every @angular/* package in your app with it: the pin is still exact. Getting started
  • The newer ngp fixes code it compiled differently from ng build: a generated import alias (i0, i1, …) that clashed with a name already in the file, import x = … statements that weren't hoisted with the other imports, hostDirectives entries that could be dropped, and globals declared in a .d.ts file the tsconfig includes that didn't resolve. Angular itself now reports an unknown property bound on an explicit <ng-template>, under ng build too, so a template that compiled on next.4 can fail on rc.0. Status

10 November 2026#

Fixes#

  • A template edit now updates in place for a component outside the folder that holds the app's tsconfig, such as a library next to the app in a monorepo. The plugin sent the update under a path relative to that folder (../../libs/ui/...), while the compiled component listens for its full path, so the page ignored the update until a reload. How it works

9 November 2026#

Builds#

  • vite build and Vitest now keep compiled output between runs, under Vite's cacheDir, and skip ngp's code generation, the linker and the build optimizer for every module whose code, templates, stylesheets and used components are unchanged. A new cache option, on by default, turns it off. The dev server doesn't use it. On the 5,000-component app, measured on a loaded laptop, a build without type-checking went from 48 s cold to 16 s warm. How it works, Configuration

Linking libraries#

  • The linker no longer runs through Babel. The plugin drives Angular's FileLinker over Vite's oxc parser, a port of the pair the CLI keeps private, and splices each linked definition into the module in place. On the 21 partially compiled modules of Angular's own packages it's about three times faster warm and eight times on the first module, measured in one process, not on the bench. The output is the same; a declaration's constants now sit in a pure IIFE around its definition instead of at module scope. @babel/core is gone from the package's dependencies. How it works, Status and limits

Fixes#

  • The generated entry-only tsconfig in Vite's cache directory is now named by its content and moved into place after it's written whole. Two Vite processes on one project with different entries, a dev server next to a Vitest run, say, could overwrite each other's file or read a half-written one and fail with "Could not load the ng-exp-compiler analysis engine". Configuration

7 November 2026#

Configuration#

  • An engine that is neither 'native' nor 'wasm' now fails startup with a message naming both, like a wrong typeChecker does. Before, any value other than 'native' quietly loaded the single-threaded wasm analyzer, so a typo like 'natve' made every compile slower with no error. Configuration

Docs#

  • Configuration and Status and limits now give the same type-check figures as Type-checking and Performance, from the rerun: on the 5,000-component app a planted template error reaches the terminal in 1.36 s with tsgo and 1.02 s with tsrs. They still carried 1.56 s and 1.12 s from the single earlier run, and 1.45 s.
  • The compile-time globals table in How it works now says ngHmrMode is false in builds, in server environments, under Vitest and with hmr: false, not only under Vitest.

i18n#

  • ngp-extract-i18n with a flag it doesn't know, such as --out, or a flag missing its value, now prints which flag was wrong and the usage text, and exits 1, instead of a Node stack trace. A --duplicates value other than error, warning or ignore is an error too, where before it acted as warning. Internationalization

Dev server#

  • Closing a dev server in middleware mode, the setup for hosting Vite inside your own Node server, now closes the ngp compilers. The plugin closed them when Vite's HTTP server closed, and middleware mode has none, so the analyzers and their threads outlived vite.close(). They now close when Vite closes the server, with or without an HTTP server. Server rendering

Server rendering#

  • A server entry named in ssr: {entry: 'src/server.ts'} is now in the default entries, so it gets zone.js/node, your other polyfills and the i18n prelude. Before, only src/main.ts and src/main.server.ts were, and a zone.js app with a custom server entry failed to bootstrap on the server unless you set entries, which replaces the whole default. Configuration
  • With ssr, vite build now writes the browser bundle to <outDir>/client and the server entry to <outDir>/server, following your build.outDir. It used to write dist/client and dist/server whatever build.outDir said. Without a build.outDir nothing moves, and an outDir you set on the client or ssr environment is kept. Server rendering

6 November 2026#

Testing#

  • The documented Vitest setup now runs specs in Node on the server platform: environment: 'node', @angular/platform-server/init and ServerTestingModule. The DOM is Domino, the one Angular renders with on the server, so a component that passes its spec also renders on the server, and a warm run of the playground's 11 tests went from 1.1–1.3 s to 0.58–0.61 s without jsdom's window setup. Domino is smaller than jsdom: spread querySelectorAll results with Array.from, and dispatch new Event(type) rather than new MouseEvent(type). jsdom is still documented as the alternative. Testing with Vitest
  • Vitest's browser mode works too, on headless Chromium through @vitest/browser-playwright, with the same specs and the jsdom setup file. The playground now runs its specs all three ways, as three Vitest projects, and the page compares them. Testing with Vitest

Angular#

  • The plugin moved from Angular 22.3.0-next.2 to 22.3.0-next.4, and the ngp it carries is built from the commit that release was cut at. Move every @angular/* package in your app with it: the pin is still exact, because ngp imports private APIs from @angular/compiler-cli. Getting started

Type-checking#

  • ngp now runs Angular's extended diagnostics, the NG81xx template checks ng build reports, so an uninvoked signal in an interpolation or a unitless CSS length is a warning in your terminal while the module compiles. They come out of the compile, not the type-check pass, so you get them with typeCheck: false too, and your tsconfig's angularCompilerOptions.extendedDiagnostics decides their severity. A check name or category that doesn't exist fails startup with Angular's message, instead of turning every extended check off in silence. Type-checking

Dev server#

  • Restoring a file you deleted recovers again. The newer analyzer drops the edge from an importer to a file it's told was deleted, so a restored component stayed "not a known element" until the importer was edited; the plugin now tells the analyzer about created files and re-analyzes the importers itself. How it works

21 October 2026#

Packaging#

  • On npm: npm install -D @push-based/vite-plugin-ngp. 0.2.0 is the first version there, and it needs no toolchain option and no pnpm toolchain, because it carries its own ngp build. Getting started now starts from npm; building ngp in a clone is for working on the plugin. Status and limits
  • The Building ngp page and the playground's clone-and-build steps are gone from this site, since using the plugin no longer needs a Rust build. Building ngp to work on the plugin is in the repo's docs/building.md. Getting started
  • The package is now named @push-based/vite-plugin-ngp, under the PushBased npm org like its other packages. Import the plugin with import {ngp} from '@push-based/vite-plugin-ngp'. If you installed it from a clone, run pnpm install again and change that one import in vite.config.ts; the plugin's options didn't change. Getting started

20 October 2026#

Packaging#

  • The plugin's package now carries its own ngp build: ngp's backend, the wasm engine, and native engines for macOS (arm64, x64) and glibc Linux (x64, arm64). When neither toolchain nor NGP_TOOLCHAIN is set, the plugin loads that build, so a released copy needs no options and no pnpm toolchain. Nothing is on npm yet, so for now this changes nothing for a copy installed from a clone. Configuration, docs/building.md

19 October 2026#

Repo#

Docs site#

  • The ngp benchmark is public, so its links on Performance, Benchmarks and Comparison work for everyone and no longer say "private repo". It has the generator behind the test apps, the methodology, and the audits the plugin's design started from.
  • A new logo: an Angular "A" between two parentheses, inside a gear, in cyan to magenta. It's in the header, on the home page, as the favicon, and in the repo's README. The inside of the gear is transparent, so it looks the same on the light theme and the dark one.

18 October 2026#

Type-checking#

  • What the idle-triggered first check gains on a cold start is now measured on the generated 5,000-component app, with the plugin before and after the change started in the same rounds: first paint went from 1.84 s to 1.70 s, every sample of the old plugin slower than every sample of the new. A restart paints before the old one-second delay ever fired, and didn't move. Type-checking

Docs#

  • The Performance page is remeasured on the plugin with the tsrs option merged and the first dev-server check waiting for an idle server: the four generated apps on the laptop, now with typeChecker: 'tsrs' as a row of its own in every table. tsrs shows a type error at 5,000 components in 1.02 s where tsgo takes 1.36 s, and takes about half a gigabyte off the dev server's peak during edits and off a production build's; starts, edits and build times are within the run-to-run drift with either. Every other number moved by a few percent either way. Performance
  • The Benchmarks page is remeasured too, on the same plugin: the two real apps on GitHub's runners and on the laptop. The change that shows is Super Productivity's cold start on a 4-core runner, 10.5 s against ng serve's 17.4 where the morning's run had 21.4 against 23.1, at a peak of 3.0 GB instead of 4.9, now that the first type-check waits for an idle server; the runners were faster this time too, and the page says how much of the drop is which. Benchmarks

17 October 2026#

Type-checking#

  • New option typeChecker: 'tsrs' runs the type check with tsrs, Oxc's Rust port of TypeScript 7, instead of tsgo. You install tsrs yourself; the plugin hands it the same tsconfig and errors land in the same places. On the 5,000-component app a planted template error reaches the terminal in 1.12 s instead of 1.56 s, measured in one run; on the playground the two are even. Checking with tsrs

Docs site#

  • The site has search. Press ⌘K (Ctrl+K off a Mac) or the search button in the header, and it finds any page and the section of it that matches, such as allowedHosts in Server rendering. The index is built with Pagefind when the site is, and nothing of it loads until you open search: about 165 kB compressed then, most of it Pagefind's WebAssembly and the index.
  • A link to a section, from "On this page", from search or from a URL with a #, leaves the heading below the header instead of under it, on a phone too. Try What it checks.

Type-checking#

  • The first type-check of a dev-server session waits until the server is idle, half a second with no request and no module compile, instead of starting one second after the server starts. Generating every component's type-check block ran on Vite's thread while the first page was compiling; on Super Productivity that was 0.67 s of the thread, and first paint went from 6.72 s to 6.00 s on a warm restart once the check waits. The first errors show up later, after the page instead of alongside it. Checks after edits are unchanged. Type-checking

Server rendering#

  • The dev server pre-bundles and caches the server's Angular libraries, in node_modules/.vite/deps_ssr, instead of linking and transforming them on every start. On the playground the first server-rendered page after a warm restart went from 1.3 s to 0.74 s. The server bundle has no source maps: a stack trace from inside Angular points into the readable pre-bundle. Server rendering

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 .ts file 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-ngp also 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 serve takes 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 serve holds 6.0 GB, and 1.4 GB after the edits where ng serve holds 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.mjs and follow the site's dark theme. Performance, Benchmarks on real apps
  • Bundle size has figures too: all the JavaScript a build writes and the initial part, gzipped, per tool and app. On the generated apps the plugin's output is within 3% of ng build's; on Super Productivity it's 10% smaller than the CLI's, on Ghostfolio 3% larger. 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 build takes 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. The bench-real workflow 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 fails vite build. The error is logged and the build goes on, as ng build does with the same file. Ghostfolio's Catalan translations have two such units. Internationalization

This site#

  • A new page, Compared with alternatives, sets vite-plugin-ngp next to ng serve, Analog (its default path and fastCompile) and @oxc-angular/vite: when each compiles, whose compiler it runs, type-checking, HMR, SSR, linking, and how you get it, with a source for every claim and where the plugin is weaker.
  • A new page, Migrating inside an Nx workspace: how to move one app of an Nx workspace to the plugin while the rest stays on Nx. Vite's root in the app's folder, tsconfig.base.json's paths as Vite aliases, libraries compiled from source with the app, export type and decorator metadata, Nx targets, and why nx build my-lib stays on ng-packagr. Checked on Ghostfolio, with Vite's root at the workspace root and at the app's folder.
  • Status and limits says library builds aren't supported, and Migrating from ng build lists a library project under what can't move.
  • Migrating from ng build now says where localize and i18nMissingTranslation go, 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. Building ngp (docs/building.md) now starts with git clone instead 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 .ts module 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 build runs Angular's build optimizer, which brings the playground's JavaScript to within 2% of ng build's. How it works
  • ngp builds inside the repo with one command, pnpm toolchain, with no Rust installed beforehand. docs/building.md

Editing in the dev server#

  • Component HMR: an external template edit updates the running component in place, keeping its state. How it works
  • A .ts edit that only changes a component's inline template or styles updates 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 templateUrl file reports NG2008 instead 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, budgets and polyfills, 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 get async/await rewritten so change detection still runs after an await. Every other build option is mapped to Vite config. Migrating from ng build

Internationalization#

  • New option i18n: Angular's i18n attributes and $localize, with a dev server in one locale and a vite build that writes one translated folder per locale, server bundles included. Internationalization
  • ngp-extract-i18n writes the app's messages as XLIFF 1.2 or 2.0, XMB, JSON or ARB, like ng extract-i18n. Internationalization
  • The compiler reads enableI18nLegacyMessageIdFormat and i18nNormalizeLineEndingsInICUs from angularCompilerOptions, and the plugin defines ngI18nClosureMode, so message ids match ng build's. Internationalization

Server rendering#

  • New option ssr: pages render on the server in the dev server, and vite build builds 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 where ng serve takes 28.5 s, and a template edit in about 150 ms where ng serve takes 1.8 s. The harness is in the repo's bench/ folder. Performance

This site#

  • Docs at https://push-based.github.io/vite-plugin-ngp/, 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.txt for AI assistants.