Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fhvite-0.0.3.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fhvite-0.0.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for fhvite-0.0.3.tar.gz
Algorithm Hash digest
SHA256 748596c9403c04f3d5a5a7e85c62fae5338a422fe105c2a7f07c7c7d56cf53de
MD5 5b346cfc28469b83ee069718a66fcbcf
BLAKE2b-256 3b6fd78f13cb04770eabb78f5a428d886c516e475685c720f90aaf4d5dc97d95

See more details on using hashes here.

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

Hashes for fhvite-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 06a38dfa80da870a6bf717184d1990de802249db3ecfe286ad5608b72908b3e1
MD5 73f0e9c5dbe90f61db4118afef606f3b
BLAKE2b-256 847a7c0876cf2796f0c6e52e0d117c6ce55a9be0ac5cbd6b68d280be2367e10f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page