File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ declare const __APP_VERSION__ : string ;
2+ declare const __GIT_HASH__ : string ;
Original file line number Diff line number Diff line change @@ -158,8 +158,10 @@ export function Footer() {
158158 < span className = "text-sm" > Copyright © 2025 Soldered. All rights reserved.</ span >
159159 </ div >
160160
161- { /* Version bottom-right */ }
162- < span className = "absolute bottom-2 right-4 text-s text-gray-500" > v1.0.0</ span >
161+ { /* Version bottom-right (dynamic) */ }
162+ < span className = "absolute bottom-2 right-4 text-s text-gray-500" >
163+ { "v" + __APP_VERSION__ } { __GIT_HASH__ ? ` (${ __GIT_HASH__ } )` : "" }
164+ </ span >
163165 </ footer >
164166 ) ;
165167}
Original file line number Diff line number Diff line change 11import { defineConfig , loadEnv } from "vite" ;
2+ import { version } from "./package.json" ;
23import react from "@vitejs/plugin-react" ;
34
45export default defineConfig ( ( { mode } ) => {
56 const env = loadEnv ( mode , process . cwd ( ) , "" ) ;
7+
68 return {
79 base : env . VITE_BASE ?? "/" ,
810 plugins : [ react ( ) ] ,
11+ define : {
12+ __APP_VERSION__ : JSON . stringify ( version ) ,
13+ __GIT_HASH__ : JSON . stringify ( process . env . VITE_GIT_HASH || "" ) ,
14+ } ,
915 } ;
1016} ) ;
You can’t perform that action at this time.
0 commit comments