Remove frontend build-version plumbing

The backend status endpoint already reports the shared git hash and
environment, so the SPA no longer needs its own baked copy.
This commit is contained in:
2026-09-17 08:33:22 -05:00
parent 8a81764401
commit 063305c552
2 changed files with 0 additions and 22 deletions
-5
View File
@@ -1,5 +0,0 @@
declare const __GIT_COMMIT_HASH__: string;
export const GIT_COMMIT_HASH = __GIT_COMMIT_HASH__;
export const APP_ENV = import.meta.env.DEV ? "dev" : "prod";
export const APP_VERSION = `${APP_ENV} @ ${GIT_COMMIT_HASH}`;
-17
View File
@@ -1,30 +1,13 @@
import { execSync } from "node:child_process";
import { fileURLToPath, URL } from "node:url";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
function gitCommitHash(): string {
try {
return execSync("git rev-parse --short HEAD", {
cwd: fileURLToPath(new URL(".", import.meta.url)),
stdio: ["ignore", "pipe", "ignore"],
})
.toString()
.trim();
} catch {
return "unknown";
}
}
const backend = process.env.VITE_BACKEND ?? "http://127.0.0.1:8000";
// https://vite.dev/config/
export default defineConfig({
define: {
__GIT_COMMIT_HASH__: JSON.stringify(gitCommitHash()),
},
plugins: [react(), tailwindcss()],
resolve: {
alias: {