Registry / web-framework / litestar-vite

litestar-vite

JSON →
library0.24.1pypypiunverified

Vite plugin for Litestar that integrates Vite's frontend build tool with the Litestar ASGI framework. Current version 0.22.1, supports Python >=3.10, and is actively maintained with frequent releases.

pip install litestar-vite
INSTALL
IMPORT
SIG · LITESTAR-VITE
L
litestar-vite
web-frameworkpythonv0.24.1
Install
6.5s avg
Import
Disk
73MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.24.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 74MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.5s · import 0.000s · 75MB
73MB installed
● package 73MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

VitePlugin
from litestar_vite import VitePlugin
from litestar_vite import VitePlugin

Basic setup: configure Vite paths and register the plugin on the Litestar app.

from litestar import Litestar from litestar_vite import VitePlugin, ViteConfig config = ViteConfig( bundle_dir='frontend/dist', resource_dir='frontend/public', hot_file='frontend/hot', ) app = Litestar(plugins=[VitePlugin(config)]) # Run with: litestar run
litestar --version
Debug
Known issues
breakingVersion 0.20.0 dropped support for Vite 5. Vite 6+ (including 7 and 8) is required.
fix
Upgrade your frontend project to Vite >=6. See the migration guide.
affects: >=0.20.0
deprecatedThe `inertia` feature was removed in v0.19.0. Use the separate `litestar-inertia` package instead.
fix
Install `litestar-inertia` and update your imports from `litestar_vite.inertia` to `litestar_inertia`.
affects: >=0.19.0
gotchaThe `hot_file` parameter defaults to 'hot' but must point to a file that exists during development (created by Vite). Missing this file causes startup errors.
fix
Ensure your Vite dev server is running before starting Litestar, or set `hot_file=None` to disable in production.
affects: all
gotchaIf you use `--frontend-dir` in CLI commands, ensure it matches the `resource_dir` or `bundle_dir` in config. Mismatches cause file-not-found errors.
fix
Align the CLI argument with your ViteConfig settings, e.g., `litestar assets init --frontend-dir frontend`.
affects: >=0.18.0
Upgrade
Version history
0.24.1latest on PyPI · released Jun 7, 2026
Audit
Dependencies
litestarrequiredCore framework dependency; litestar-vite requires Litestar to function.
nodejsoptionalVite is a Node.js tool; Node.js must be installed on the system.
Agent activity
2 hits · last 30 days
node
2
Resources
litestar-vite — pip install litestar-vite · libregistry