feat: add footer with app version

This commit is contained in:
Jefferson Mantovani
2025-10-31 07:14:44 -03:00
parent 57714fac9b
commit d33d7f8538
3 changed files with 24 additions and 2 deletions

View File

@@ -1,16 +1,28 @@
import { fileURLToPath, URL } from "node:url";
import { execSync } from "node:child_process";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";
import svgLoader from "vite-svg-loader";
function getGitCommitHash(): string {
try {
return execSync("git rev-parse --short HEAD").toString().trim();
} catch (error) {
return "unknown";
}
}
// https://vitejs.dev/config/
export default defineConfig({
base: "./",
build: {
target: "esnext",
},
define: {
__APP_VERSION__: JSON.stringify(getGitCommitHash()),
},
optimizeDeps: {
esbuildOptions: {
target: "esnext",