.NET React Templates

Vite+ Toolchain

One vp CLI and one vite.config.ts to develop, build, check, lint, format and test every template

Vite+ Toolchain

All React, Next.js, TanStack Start and Astro templates (and the Vue templates) use Vite+, the unified JavaScript toolchain from VoidZero - the team behind Vite, Vitest, Rolldown and Oxc.

Instead of separate tools, each with their own dependencies, config files and CLIs, Vite+ provides a single vp CLI for developing, building, linting, formatting, type checking and testing, all configured from a single vite.config.ts.

What it replaces

TaskBeforeCommandNow
Dev Server & BuildVite 7 (Rollup + esbuild)vp dev / vp buildVite 8 (Rolldown)
LintingESLint 9 + pluginsvp lintOxlint, type-aware
Formattingnonevp fmtOxfmt
Type Checkingtsc (TypeScript 5)vp checkTypeScript Go (TypeScript 7 in React & Next.js templates)
TestingVitest 4vp testVitest
All checksmultiple tools & configsvp checkformat + lint + types in one pass

Lint, format and test configuration all lives in vite.config.ts, replacing separate eslint.config.js and vitest.config.ts files, with a lot fewer devDependencies to maintain.

Who runs the dev server and build

Vite+ checks, lints, formats and tests every template. Whether it also runs the dev server and production build depends on the framework:

TemplatesDev server & buildvp is used for
react-static, react-spa, tanstack-staticVite+ (vp dev, vp build)everything
next-static, next-rsc, nextjs, next-saas, next-licenseNext.js (next dev, next build)checking, linting, formatting & testing
astro-staticAstro (astro dev, astro build)checking, linting, formatting & testing
vue-static, vue-spaVite+ (vp dev, vp build)everything, with .vue SFCs type checked by vue-tsc

The React, Next.js, TanStack Start and Astro templates use TypeScript 7 with no separate tsc step, as Oxlint runs type-aware rules and type checking powered by TypeScript Go.

Common Commands

All templates share the same npm scripts, run from the MyApp.Client folder:

npm run dev         # Start the dev server
npm run check       # Format + lint + type check
npm run lint        # Lint with Oxlint
npm run fmt         # Format with Oxfmt
npm run test        # Run tests in watch mode
npm run test:ui     # Run tests with the Vitest UI
npm run test:run    # Run tests once
npm run outdated    # Check for outdated dependencies
npm run upgrade     # Upgrade dependencies

In development you'll usually run dotnet watch from the .NET project instead, which starts both the .NET App and the front-end dev server.

vp is installed locally as a dev dependency, so all npm scripts work without a global install. Optionally install the global CLI to run vp commands directly:

curl -fsSL https://vite.plus | bash

Consistent Formatting

All templates are formatted with Oxfmt, so code style stays consistent for both humans and AI Agents. The formatting commit is listed in .git-blame-ignore-revs to keep git blame useful.

VS Code Workspace

Every template includes a MyApp.code-workspace VS Code Workspace, which adds the MyApp.Client front-end as its own root folder alongside the .NET solution:

code MyApp.code-workspace
  • Format & Fix on Save - JS/TS files are formatted with Oxfmt and auto-fixed with Oxlint on save, using the same vite.config.ts rules as vp check and CI, whilst C# and Razor files keep their own formatters
  • Recommended Extensions - the Vite+ Extension Pack (Oxc + Vitest), the C# Dev Kit and the TypeScript 7 Native Preview language server
  • Integrated Testing - run and debug both Vitest front-end tests and NUnit .NET tests from VS Code's Testing sidebar

CI

The GitHub Actions build.yml workflow uses setup-vp to install Node and the npm dependencies with caching, and its client job checks, tests and builds the front-end on every push.

AI Agents

Each template's AGENTS.md documents the Vite+ commands, so AI Agents know to run npm run check to validate their changes, and that dtos.ts is regenerated automatically when the .NET App starts.

Learn More

On this page