vite-plugin-version-mark weekly downloads statistics
By ZhongxuYang · npm · Vite plugins
A Vite/Nuxt plugin that automatically injects version information (package.json version, git commit SHA, or custom commands) into your application via console, global variables, meta tags, and static files.
vite-plugin-version-mark has 8,586 recorded weekly downloads on npm.
About vite-plugin-version-mark
中文 | English
</div>vite-plugin-version-mark
<div align="center"> <a href="https://github.com/ZhongxuYang/vite-plugin-version-mark/tree/main"> <img src="https://raw.githubusercontent.com/ZhongxuYang/images/dev/common/version.svg" width="300px" height="100px" /> </a> </div> <div align="center">A Vite/Nuxt plugin that automatically injects version information (package.json version, git commit SHA, or custom commands) into your application via console, global variables, meta tags, and static files.
[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![types][types-src]][types-href] [![License][license-src]][license-href]
[![Vite][vite-src]][vite-href] [![Nuxt][nuxt-src]][nuxt-href]
[![Awesome][awesome-src]][awesome-href]
</div>Example
Install
pnpm add -D vite-plugin-version-mark
# OR yarn add -D vite-plugin-version-mark
# OR npm install -D vite-plugin-version-mark
Usage
Vite
// vite.config.ts
import { defineConfig } from "vite";
import { vitePluginVersionMark } from "vite-plugin-version-mark";
export default defineConfig({
plugins: [
vitePluginVersionMark({
// name: 'test-app',
// version: '0.0.1',
// command: 'git describe --tags',
// outputFile: true,
// ifGitSHA: true,
ifShortSHA: true,
ifMeta: true,
ifLog: true,
ifGlobal: true,
}),
],
});
Nuxt3+
// nuxt.config.ts
export default defineNuxtConfig({
modules: [
[
"vite-plugin-version-mark/nuxt",
{
// name: 'test-app',
// version: '0.0.1',
// command: 'git describe --tags',
// outputFile: true,
// ifGitSHA: true,
ifShortSHA: true,
ifMeta: true,
ifLog: true,
ifGlobal: true,
},
],
],
});
Then you can use vite-plugin-version-mark ! 🎉
🚀 What's New in v0.2.0: Multi-command support! Now you can execute multiple git commands and combine their results with custom formats. Perfect for creating version strings like
"main-abc1234"or"v1.0.0-main-abc1234". See examples below ⬇️
Config
vite-plugin-version-markcan be print application version in theConsole, definedglobalor add<meta>in HTML element.
| Name | Description | Type | Default | Supported |
|---|---|---|---|---|
| name | application name | string | name in package.json | 0.0.1+ |
| version | application version | string | version in package.json | 0.0.1+ |
| ifGitSHA | use git commit SHA as the version | boolean | false | 0.0.1+ |
| ifShortSHA | use git commit short SHA as the version | boolean | false | 0.0.1+ |
| command | provide a custom command to retrieve the version <br/>New: Now supports multiple commands! <br/>For example: git describe --tags or { commands: ['git branch --show-current', 'git rev-parse --short HEAD'], format: '{0}-{1}' } | string | MultiCommandOptions | git rev-parse --short HEAD | 0.0.8+ |
| ifLog | print info in the Console | boolean | true | 0.0.1+ |
| ifGlobal | set a variable named `__${APPNAME}_VERSION__` in the window<br/>For TypeScript users, make sure to add the type declarations in the env.d.ts or vite-env.d.ts file to get type checks and Intellisense. | boolean | true | 0.0.4+ |
| ifMeta | add <meta name="application-name" content="{APPNAME_VERSION}: {version}"> in the <head>… |
Description from the npm listing.
- vite
- version
- vue
- nuxt
- react
- git
- commit
- log
- plugin
- vite-plugin
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (1)Similar npm Vite plugins plugins
All 20 vite-plugin-version-mark alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/vite-plugin-version-mark. First seen Oct 27, 2026; last successful collection Oct 27, 2026. See the methodology.
