vite-plugin-update-version
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

vite-plugin-update-version

自动更新package.json里的version版本号

Automatic update version patch in package.json

用法:

usage:

npm install -D vite-plugin-update-version
import { updateVersion } from "vite-plugin-update-version";
import { fileURLToPath } from 'url'
const __filenameNew = fileURLToPath(import.meta.url)
const __dirnameNew = path.dirname(__filenameNew)

plugins: [

   /**

    \* @description: 更新package.json的版本信息, apply: 'build'打包时才调用

    \* @return {*}

    */

   {

    ...updateVersion(__dirnameNew),

    apply: 'build',

   }]

Package Sidebar

Install

npm i vite-plugin-update-version

Weekly Downloads

1

Version

1.0.9

License

MPL

Unpacked Size

12.2 kB

Total Files

5

Last publish

Collaborators

  • alan1034