litestar-vite
litestar-vite
litestar-vite is the first-party plugin that connects a Vite frontend build pipeline to a Litestar backend. It handles dev-server proxying, HMR coordination, manifest resolution for production assets, and (optionally) end-to-end type generation from Litestar OpenAPI to TypeScript.
The runtime has four canonical modes: spa, template, hybrid, and framework.
htmx, inertia, ssr, and ssg are aliases that normalize to those modes.
external is deprecated; use framework with ExternalDevServer.
The plugin pairs with the npm package litestar-vite-plugin on the JS side. Python ViteConfig is the source of truth; the generated .litestar.json bridge lets JS config normally keep only litestar({ input: [...] }).
This guidance targets the immutable v0.27.0 tag. Releases 0.26.0 through
0.27.0 hardened Inertia protocol behavior, scaffolds, type generation,
single-port HMR routing, manifest fallback, deployment, plugin activation, and
lifecycle logging. See Release Updates.