Typed Virtual Modules
Import `env` from `virtual:env/client` or `virtual:env/server` with full IntelliSense and type safety.
Define once. Validate everywhere. Import with types.
Import `env` from `virtual:env/client` or `virtual:env/server` with full IntelliSense and type safety.
Enforce variable boundaries at define-time with automatic VITE_ prefix validation. Server secrets never reach the browser.
Scans client bundles for server secret values before they ship. Catches leaks that code review misses.
Warns or errors when `virtual:env/server` is imported from a client environment. Configurable per Vite 8 environment.
Generates `vite-env.d.ts` on every build start. No manual type declarations that drift from reality.
Generate documented `.env.example` files from your Zod schema with types, defaults, and required flags.
Pre-built schemas for Vercel, Railway, and Netlify. One import gives you validated, typed access to all platform variables.
First-class Zod v4 support with rich type inference. Or use Valibot, ArkType, or any Standard Schema validator.