Skip to content

Automatically put the version file in your project dist folder

License

Notifications You must be signed in to change notification settings

Chanzhaoyu/vite-plugin-version

 
 

Repository files navigation

vite-plugin-version

NPM version

Get the version information from package.json, then automatically put the version file version.json in your project dist folder when packaging.

// package.json
{
  // ...
  "version": "0.0.1"
}
// dist/version.json
{
  "version": "0.0.1"
}

Install

npm i vite-plugin-version

Add plugin to your vite.config.ts:

// vite.config.ts
import { defineConfig } from 'vite'
import versionPlugin from 'vite-plugin-version'

export default defineConfig({
  plugins: [
    versionPlugin(),
  ],
})

License

MIT License © 2022 YRM

About

Automatically put the version file in your project dist folder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 63.3%
  • CSS 29.8%
  • HTML 6.9%