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.1.tar.gz
(72.8 kB
view hashes)
Built Distribution
Close
Hashes for litestar_vite-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 459abc5811cfcbb4e23b267cc4c69793cd203186c8df6a1fc6d96beb90cf69db |
|
MD5 | 4a9ecf089f1e5ef36207492f1bffda62 |
|
BLAKE2b-256 | 19b9bbfd5cc6c97b033481b2efe31c8811e151c9d1eddf19174e8a60f76a08fe |