npm
Source
Description
@wolfstar/vite-server is the Vite build and watch integration for Stars projects. The
stars CLI loads it on demand when build.tool resolves to 'vite', so existing
stars.config options and CLI commands are unchanged. Install vite in the consuming project; the integration
uses the project’s own versions and Vite configuration.
When to use it
Enable the integration throughstars.config.ts — the CLI handles loading and lifecycle for you:
Programmatic usage
The package exportsViteBuilder. Pass a resolved StarsConfig and a BuilderContext from
@wolfstar/schema:
importFromProject (project-relative dependency loading with diagnostics) and
pluginRegistrations (the entry transform that activates installed plugins). Since 0.2.2, pluginRegistrations
only injects <name>/register for @wolfstar/plugin-* dependencies whose exports map defines ./register, so
library plugins such as @wolfstar/plugin-cache no longer fail with ERR_PACKAGE_PATH_NOT_EXPORTED. This explicit boundary keeps the
integration independent of the CLI and framework runtimes.
watch() and close() implement the shared builder lifecycle. start, success, failure, and log events
expose build status.
Vite builds the application and uses its build watcher for rebuilds. Process supervision remains the responsibility
of the host CLI.