File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
2- "version" : " 0.0.1" ,
3- "commit" : " 36d2c2a" ,
4- "timestamp" : 1752954060802 ,
5- "buildDate" : " 2025-07-19T19:41:00.802Z" ,
6- "buildId" : " 0.0.1-36d2c2a-1752954060803" ,
7- "cacheBuster" : " v=0.0.1&t=1752954060803"
2+ "timestamp" : 1752954969663
83}
Original file line number Diff line number Diff line change @@ -9,22 +9,8 @@ function generateVersionPlugin() {
99 name : 'generate-version' ,
1010 closeBundle ( ) {
1111 // Generate version information
12- const packageJson = JSON . parse ( fs . readFileSync ( 'package.json' , 'utf8' ) ) ;
13- let commit = null ;
14-
15- try {
16- commit = execSync ( 'git rev-parse --short HEAD' , { encoding : 'utf8' } ) . trim ( ) ;
17- } catch ( error ) {
18- console . warn ( 'Could not get git commit hash' ) ;
19- }
20-
2112 const versionInfo = {
22- version : packageJson . version ,
23- commit,
24- timestamp : Date . now ( ) ,
25- buildDate : new Date ( ) . toISOString ( ) ,
26- buildId : `${ packageJson . version } -${ commit || 'unknown' } -${ Date . now ( ) } ` ,
27- cacheBuster : `v=${ packageJson . version } &t=${ Date . now ( ) } `
13+ timestamp : Date . now ( )
2814 } ;
2915
3016 // Write version.json to dist
You can’t perform that action at this time.
0 commit comments