Vite plugin for FastHTML/MonsterUI that automates installation & building
Project description
fhvite
Usage
Installation
Install the latest version from GitHub:
uv pip install git+https://github.com/AnswerDotAI/fhvite.git
This project requires bun to function properly. It will be automatically installed on first run if not already installed in the path
How to use
Import into an existing FastHTML application and add the following:
from fasthtml.common import *
# Add this import
from fhvite.core import add_vite
app = FastHTML()
# Add this line
add_vite(app)
> fastvite@0.0.0 build
> vite build
vite v7.0.4 building for production...
transforming...
✓ 3 modules transformed.
rendering chunks...
computing gzip size...
../dist/.vite/manifest.json 0.19 kB │ gzip: 0.14 kB
../dist/assets/index-DwAzhI66.css 215.53 kB │ gzip: 25.35 kB
../dist/assets/index-DSGW5Iaw.js 0.71 kB │ gzip: 0.40 kB
✓ built in 103ms
All necessary setup files will be generated if not already present. After that, subsequent server starts will simply build the assets and inject them into the app header.
The plugin function also mounts a starlette StaticFiles route
automatically, making the generated assets benefit from proper cacheing
and static serving rules.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fhvite-0.0.1.tar.gz.
File metadata
- Download URL: fhvite-0.0.1.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27671e3b0ff012dbb0225c854dcd9bb28f9dfe8d764331dd262f22c460ca4def
|
|
| MD5 |
e074fbf20bdf8dae338c8965759b5383
|
|
| BLAKE2b-256 |
eda81c4e558512f76ebd9c87cea4c01a3166c7f53be752ac351b1123a482197a
|
File details
Details for the file fhvite-0.0.1-py3-none-any.whl.
File metadata
- Download URL: fhvite-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f97858eb01b401f49374864859fc07ad24d53283c430bf2186eeb1fc8501728d
|
|
| MD5 |
1b4d96f52e6fc4436bdd7a5672fdbbcd
|
|
| BLAKE2b-256 |
5f47b424aa4f13a797728ce5af72d284b6b49cc22318ed53ae609e1eb3ff9879
|