Vite plugin for Litestar
Project description
Litestar Vite
[!IMPORTANT] This plugin currently contains minimal features and is a work-in-progress
Installation
pip install litestar-vite
Usage
Here is a basic application that demonstrates how to use the plugin.
from __future__ import annotations
from litestar import Litestar
from litestar_vite import ViteConfig, VitePlugin
vite = VitePlugin(
config=ViteConfig(
static_dir="./local_static_dir",
templates_dir="./path_to_jinja_templates",
# Should be False when in production
hot_reload=True, # Websocket HMR asset reloading is enabled when true.
port=3005,
),
)
app = Litestar(plugins=[vite])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
litestar_vite-0.1.4.tar.gz
(90.0 kB
view hashes)
Built Distribution
Close
Hashes for litestar_vite-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbc5a937988052ffa90ea1ce0db7a9ff81b3280c171cdbc16a5feffdc8eea267 |
|
MD5 | c3c063bb5fc6f327fd8cbafe2372c231 |
|
BLAKE2b-256 | ffddb31ffab4e4ba26e9f6651704a9452edb488089ac848e94858bbe38653054 |