Vite Syntax Env Vars

Use when configuring environment variables, using .env files, creating custom modes, or debugging env variable issues. Prevents exposing secrets by omitting the VITE_ prefix and misconfiguring .env file precedence. Covers import.meta.env built-ins, .env file loading order, VITE_ prefix requirement, dotenv-expand, custom modes, NODE_ENV vs mode, ImportMetaEnv TypeScript, HTML %VAR%, and loadEnv(). Keywords: import.meta.env, .env, VITE_ prefix, loadEnv, custom mode, NODE_ENV, ImportMetaEnv, environment variables not working, env undefined, access env variable, .env.local, secret exposed.

Impertio-Studio 54e6277 4 files · 27.3 KB Updated

File contents

Impertio-Studio/Vite-Claude-Skill-Package/tree/main/skills/source/vite-syntax/vite-syntax-env-vars commit 54e6277258

Frequently asked questions

npx skillmds@latest add impertio-studio/vite-syntax-env-vars