vite-plugin-html-env
JSON →A Vite plugin for rewriting HTML templates with environment variables and conditional directives. Current stable version is 1.2.8, maintained on npm. It allows replacing placeholders in HTML files with values from .env files, supports customizable prefix/suffix (default <{ }>), and offers a compiler mode with vite-if/vite-else directives. Compiler mode is enabled by default since v1.0.4, which was a breaking change from older versions. Differentiates from similar plugins by supporting import.meta.env syntax in HTML and optionally compressing output. Ships TypeScript type definitions. Minimal peer dependency on Vite.
Traffic · last 30 days ↓80% vs prev 7d
total hits 13
actors 4 distinct systems
last hit 6d ago human
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇲🇽 Mexico
Resources
API endpoints
full doc /v1/registry/vite-plugin-html-env