Add hybrid app version labels
This commit is contained in:
@@ -7,8 +7,19 @@ export default defineConfig(({ mode }) => {
|
||||
process.env.VITE_DEV_API_PROXY_TARGET ||
|
||||
env.VITE_DEV_API_PROXY_TARGET ||
|
||||
"http://localhost:8000";
|
||||
const appVersion =
|
||||
env.VITE_APP_VERSION || process.env.npm_package_version || "0.1.0";
|
||||
const appBuildInfo =
|
||||
env.VITE_APP_BUILD_INFO ||
|
||||
process.env.GIT_COMMIT ||
|
||||
process.env.BUILD_COMMIT ||
|
||||
"dev";
|
||||
|
||||
return {
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(appVersion),
|
||||
__APP_BUILD_INFO__: JSON.stringify(appBuildInfo),
|
||||
},
|
||||
plugins: [react()],
|
||||
server: {
|
||||
proxy: {
|
||||
|
||||
Reference in New Issue
Block a user