Vite Env Variables (React-TS) Skill
Implement environment variables correctly in Vite.
Rules / best practices
- Client-exposed env vars MUST be prefixed with VITE_.
- Access via import.meta.env (not process.env).
- Document variables in .env.example.
- Do not commit secrets; if asked, recommend server-side storage instead.
- Provide TypeScript types for env when helpful (vite-env.d.ts).
Deliverables
- .env.example entries
- Optional: env typing augmentation
- Usage snippet in a React component
Use template.md as the default structure.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.