{"id":23972,"library":"litestar-vite","title":"Litestar Vite","description":"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.","status":"active","version":"0.22.1","language":"python","source_language":"en","source_url":"https://github.com/litestar-org/litestar-vite","tags":["litestar","vite","plugin","frontend","integration","inertia","ssr"],"install":[{"cmd":"pip install litestar-vite","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core framework dependency; litestar-vite requires Litestar to function.","package":"litestar","optional":false},{"reason":"Vite is a Node.js tool; Node.js must be installed on the system.","package":"nodejs","optional":true}],"imports":[{"note":"Old import path from earlier versions; now a separate package.","wrong":"from litestar.plugins.vite import VitePlugin","symbol":"VitePlugin","correct":"from litestar_vite import VitePlugin"},{"note":"Common misimport; ViteConfig resides in litestar_vite, not litestar.","wrong":"from litestar.config import ViteConfig","symbol":"ViteConfig","correct":"from litestar_vite import ViteConfig"}],"quickstart":{"code":"from litestar import Litestar\nfrom litestar_vite import VitePlugin, ViteConfig\n\nconfig = ViteConfig(\n    bundle_dir='frontend/dist',\n    resource_dir='frontend/public',\n    hot_file='frontend/hot',\n)\n\napp = Litestar(plugins=[VitePlugin(config)])\n# Run with: litestar run\n","lang":"python","description":"Basic setup: configure Vite paths and register the plugin on the Litestar app."},"warnings":[{"fix":"Upgrade your frontend project to Vite >=6. See the migration guide.","message":"Version 0.20.0 dropped support for Vite 5. Vite 6+ (including 7 and 8) is required.","severity":"breaking","affected_versions":">=0.20.0"},{"fix":"Install `litestar-inertia` and update your imports from `litestar_vite.inertia` to `litestar_inertia`.","message":"The `inertia` feature was removed in v0.19.0. Use the separate `litestar-inertia` package instead.","severity":"deprecated","affected_versions":">=0.19.0"},{"fix":"Ensure your Vite dev server is running before starting Litestar, or set `hot_file=None` to disable in production.","message":"The `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.","severity":"gotcha","affected_versions":"all"},{"fix":"Align the CLI argument with your ViteConfig settings, e.g., `litestar assets init --frontend-dir frontend`.","message":"If you use `--frontend-dir` in CLI commands, ensure it matches the `resource_dir` or `bundle_dir` in config. Mismatches cause file-not-found errors.","severity":"gotcha","affected_versions":">=0.18.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install litestar-vite` in the correct Python environment.","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'litestar_vite'"},{"fix":"Ensure you pass a ViteConfig object with bundle_dir set to an existing directory, e.g., `ViteConfig(bundle_dir='frontend/dist')`.","cause":"ViteConfig is missing or bundle_dir does not exist.","error":"litestar.exceptions.ImproperlyConfiguredException: VitePlugin requires a 'ViteConfig' instance with a valid 'bundle_dir'"},{"fix":"Start the Vite dev server first, or set `hot_file=None` in ViteConfig if not needed.","cause":"The hot file path does not exist, usually because Vite dev server is not running or the path is wrong.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'frontend/hot'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}