vite-plugin-runtime-env
JSON →Vite plugin that injects environment variables at runtime instead of build time, enabling adherence to 12-factor app principles. Current stable version is v1.0.0, released as first stable after a long period in pre-release. It replaces import.meta.env references with window.env lookups and inserts placeholder variables in index.html for substitution during deployment using tools like envsubst. Key differentiators: supports multiple substitution syntaxes (dollar-basic, dollar-curly, handlebars), optionally ignores certain variables for build-time replacement, and allows custom variable names. Requires Vite as a peer dependency.
Traffic · last 30 days stale · no recent hits
total hits 19
actors 6 distinct systems
last hit 16d ago ChatGPT-User
top countries 🇺🇸 United States · 🇨🇦 Canada · VN · 🇫🇷 France · 🇩🇪 Germany
Resources
API endpoints
full doc /v1/registry/vite-plugin-runtime-env
compatibility /v1/registry/vite-plugin-runtime-env/compatibility