Skip to content

Commit

Permalink
fix: bump version in build command only for prepare mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Hintay committed Sep 17, 2024
1 parent 5929411 commit a703d34
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export default async function vitePluginBuildId(options: Options = {}) {
await __v.init()

// bump version for prepare
if(pluginOptions.prepare) {
if(pluginOptions.prepare && config.command === 'build') {
__v.bump()
__v.buildVersionJson()
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "module",
"name": "vite-plugin-build-id",
"description": "Automatically generates build_id after production compiled",
"version": "0.3.8",
"version": "0.3.9",
"author": "0xJacky",
"license": "MIT",
"main": "dist/index.js",
Expand Down

0 comments on commit a703d34

Please sign in to comment.