Skip to content
AnswerDotAIPublic

About

Vite plugin for FastHTML/MonsterUI that automates installation & building

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

59 Commits

Folders and files

Repository files navigation

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)

At app startup, add_vite creates missing setup files, runs pybun install, builds assets with pybun run build and adds the entry-point scripts and stylesheets to the app header. Installation follows the project’s lockfile.

For a prebuilt deployment, use add_vite(app, run_build=False). It reads the existing manifest without creating setup files, installing dependencies or building. Both modes serve content-hashed build assets through FastHTML’s StaticImmutable.

About

Vite plugin for FastHTML/MonsterUI that automates installation & building

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages