Vite Frontend Provider
This guide shows how to use the Vite-powered frontend module provider with Webstir.
Prerequisites
- Workspace created with
webstir init(fullstack or frontend). - Dependencies restored (
pnpm installby default; use your package manager as needed). - Provider package available:
@webstir-io/vite-frontend(install from the registry).
Quick Start
-
Install the provider (once per workspace):
pnpm add -D @webstir-io/vite-frontend -
Update
webstir.providers.jsonin the workspace root:{
"frontend": "@webstir-io/vite-frontend"
} -
Synchronize dependencies:
webstir install -
Run build/publish:
webstir build
webstir publish
Use WEBSTIR_FRONTEND_PROVIDER for ad-hoc overrides. Logs include provider id, entry points, and diagnostics streamed from the module host bridge.
Watch Mode
WEBSTIR_FRONTEND_PROVIDER=@webstir-io/vite-frontend webstir watch
Hot-update diagnostics flow through the same provider manifest; tail the CLI output to validate HMR behaviour.
Tip: For unpublished builds from the standalone repository, set
WEBSTIR_FRONTEND_PROVIDER_SPEC=<path-to-local-vite-frontend>(for example../vite-frontend) so the host installs your local checkout.
Notes
- Provider selection also affects
webstir testwhen it triggers frontend builds. - Provider selection also affects
webstir install; keepwebstir.providers.jsonin sync with the dependencies committed to the workspace. - Backend swaps use
WEBSTIR_BACKEND_PROVIDER(seeDocs/how-to/provider-selection.md). - Regression coverage:
Tester.Workflows.Build.BuildWorkflowTests.BuildWithViteProviderProducesArtifactsexercises the provider end-to-end.