Vite Plugin Git Commit Hash

JSON →
library 1.0.7 ·javascript
verified Apr 27, 2026

A Vite plugin that injects the latest Git commit hash as a global `GIT_COMMIT_HASH` variable at build time. Current stable version is 1.0.7, released under MIT license. It is lightweight, has zero runtime dependencies (only peer dependency on Vite >=3), and ships TypeScript declarations. The plugin is ESM and CommonJS compatible. Key differentiator: it provides a simple, declarative way to expose git hash without complex build scripts or environment variables.

total hits 16
actors 3 distinct systems
last hit 1d ago AhrefsBot
GPTBot
5
Search engines
1
Humans
2

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇪🇸 Spain · CI