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 stale · no recent hits
total hits 11
actors 4 distinct systems
last hit 25d ago AhrefsBot
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇬🇧 United Kingdom
Resources
API endpoints
full doc /v1/registry/vite-plugin-html-env
compatibility /v1/registry/vite-plugin-html-env/compatibility