Add Version Number To Footer
This commit is contained in:
@@ -4,8 +4,22 @@ import vue from '@vitejs/plugin-vue';
|
||||
import path from 'path';
|
||||
import vuetify from "vite-plugin-vuetify";
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
import { execSync } from 'child_process'
|
||||
|
||||
|
||||
function getAppVersion(): string {
|
||||
try {
|
||||
// Prefer a tag if one points at HEAD, else fall back to short hash
|
||||
return execSync('git describe --tags --always --dirty').toString().trim()
|
||||
} catch {
|
||||
return 'Unknown'
|
||||
}
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(getAppVersion()),
|
||||
},
|
||||
plugins: [
|
||||
laravel({
|
||||
input: 'resources/js/app.ts',
|
||||
|
||||
Reference in New Issue
Block a user