vavite is a Vite plugin for developing and building server-side applications, using Vite as the transpiler/bundler. It enables using Vite's SSR capabilities for general server-side code (TypeScript, JSX) without extra tools like ts-node. Current stable version is 6.2.1, supporting Vite 7 or 8 (peer dependency). Key differentiators: simplifies SSR workflow, supports handler and server entry types, provides HMR for server code. Rewritten in v6 with a simplified API, server-side HMR, and separate server mode (e.g. for Bun.serve).
npm install vaviteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal project setup: Vite config with vavite plugin, and a handler entry that responds to root requests with HTML and starts a standalone production server.
Change to named import: import { vavite } from 'vavite'.Consult the migration notes at https://github.com/cyco130/vavite#migrating-from-v5.
Use `type: 'handler'` in entries configuration.
Wrap production server start with `if (import.meta.env.COMMAND === 'build')`.
Add the triple-slash directives at the top of your entry file, or include them in tsconfig.json types array.
Install vavite as dev dependency: npm install --save-dev vavite. Ensure tsconfig.json includes 'node' in types or 'moduleResolution' is 'bundler'.
Change `import vavite from 'vavite'` to `import { vavite } from 'vavite'`.Ensure src/entry.server.{js,ts} exists with a default export and correct entry type in config.Ensure your project is ESM (type: module in package.json) and Node.js >=18.