import type { NextConfig } from "next"; import { execSync } from "child_process"; // Get the current git commit hash const getGitCommitHash = () => { try { return execSync("git rev-parse --short HEAD", { encoding: "utf8" }).trim(); } catch (error) { console.warn("Could not get git commit hash:", error); return "unknown"; } }; const nextConfig: NextConfig = { output: "export", reactCompiler: true, env: { NEXT_PUBLIC_GIT_COMMIT: getGitCommitHash(), }, }; export default nextConfig;