Skip to content

Environment Variables ​

@saflib/vite does not declare its own env.schema.json. typedEnv casts process.env to ViteEnvSchema, which extends the core schema from @saflib/env.

Client build packages validate env at config load time (see base/clients/build/vite.config.ts) using a combined schema from dependencies.

Variables used by makeConfig ​

VariableRole
CLIENT_SUBDOMAINSComma-separated SPA subdomains (e.g. app,auth,admin,account,). Empty segment = apex client at root index.html. Drives Rollup inputs and dev subdomain routing.
DOMAINProduct domain (e.g. example.docker.localhost)
PROTOCOLhttp or https — used for dev URL banner and origin helpers

Other core vars (DEPLOYMENT_NAME, NODE_ENV, TZ, …) are inherited for typing and for merged define blocks in product build configs. Full definitions: @saflib/env — Environment Variables.

Add new Vite-specific variables on @saflib/vite with env/add-var, or on the product build package if they are product-only.