Vite plugin for FastHTML/MonsterUI that automates installation & building
Project description
fhvite
Usage
Installation
Install the latest version from pypi:
pip install fhvite
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)
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 FastHTML
StaticNoCache(directory=pwd/'dist') route pointing to the output
folder. This ensures the generated assets benefit from modern cacheing/
asset serving behaviour automatically.
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.3.tar.gz.
File metadata
- Download URL: fhvite-0.0.3.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
748596c9403c04f3d5a5a7e85c62fae5338a422fe105c2a7f07c7c7d56cf53de
|
|
| MD5 |
5b346cfc28469b83ee069718a66fcbcf
|
|
| BLAKE2b-256 |
3b6fd78f13cb04770eabb78f5a428d886c516e475685c720f90aaf4d5dc97d95
|
File details
Details for the file fhvite-0.0.3-py3-none-any.whl.
File metadata
- Download URL: fhvite-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06a38dfa80da870a6bf717184d1990de802249db3ecfe286ad5608b72908b3e1
|
|
| MD5 |
73f0e9c5dbe90f61db4118afef606f3b
|
|
| BLAKE2b-256 |
847a7c0876cf2796f0c6e52e0d117c6ce55a9be0ac5cbd6b68d280be2367e10f
|