File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed
Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 2525 - name : Build
2626 run : dotnet run bundle
2727 env :
28- APP_VERSION : ${{ github.ref_name }}
28+ VITE_APP_VERSION : ${{ github.ref_name }}
2929
3030 - name : Azure Login
3131 uses : azure/login@v1
Original file line number Diff line number Diff line change 1515 </ script >
1616 < script type ="module " src ="/output/App.js "> </ script >
1717 < script type ="module ">
18- document . title = document . title . concat ( ` - v${ window . APP_VERSION } ` )
18+ const appVersion = import . meta. env . VITE_APP_VERSION || "dev"
19+ document . title = document . title . concat ( ` - v${ appVersion } ` )
1920 </ script >
2021
2122</ body >
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import react from "@vitejs/plugin-react";
33
44const proxyPort = process . env . SERVER_PROXY_PORT || "5000" ;
55const proxyTarget = "http://localhost:" + proxyPort ;
6- const appVersion = process . env . APP_VERSION || "dev"
76
87// https://vitejs.dev/config/
98export default defineConfig ( {
@@ -20,8 +19,5 @@ export default defineConfig({
2019 changeOrigin : true ,
2120 }
2221 }
23- } ,
24- define : {
25- APP_VERSION : JSON . stringify ( appVersion ) ,
2622 }
2723} ) ;
You can’t perform that action at this time.
0 commit comments