Select Module Providers
Webstir can swap module providers without code changes. Use the environment variables below or edit webstir.providers.json to override the defaults.
Frontend
WEBSTIR_FRONTEND_PROVIDER=@webstir-io/vite-frontend webstir build
@webstir-io/webstir-frontend(default)@webstir-io/vite-frontend(Vite build pipeline)
Or add a webstir.providers.json file to the workspace root:
{
"frontend": "@webstir-io/vite-frontend"
}
After editing
webstir.providers.json, runwebstir installto ensure the provider dependency is installed.
Backend
WEBSTIR_BACKEND_PROVIDER=@webstir-io/webstir-backend webstir publish
Backend swaps will pick up any provider published under the module contract.
Testing
WEBSTIR_TESTING_PROVIDER=@webstir-io/webstir-testing webstir test
@webstir-io/webstir-testing— default VM-based provider published by Webstir.@webstir-io/vitest-testing— Vitest integration; add it with your package manager (for example,pnpm add -D @webstir-io/vitest-testing) then runWEBSTIR_TESTING_PROVIDER=@webstir-io/vitest-testing webstir test.
Or add a webstir.providers.json entry:
{
"testing": "@webstir-io/webstir-testing"
}
Quickstart for unpublished builds:
WEBSTIR_TESTING_PROVIDER=@webstir-io/vitest-testing \
WEBSTIR_TESTING_PROVIDER_SPEC=../vitest-testing \
webstir test
The host installs providers from WEBSTIR_TESTING_PROVIDER_SPEC when set; leave it empty when consuming from the registry. Point the value at your local clone of the standalone repository when testing unpublished builds.
Notes
- Generated workspaces include a
webstir.providers.jsonfile with defaults—check it into version control to make provider selection explicit. - The provider must implement
@webstir-io/module-contractand be installed in the workspace. - The module-host bridge proxies all output via the
.NEThost; log entries include provider id, entry points, and diagnostics. - Future work will add config-driven selection (
webstir.config.ts).