iota-frontend/next.config.ts
2026-04-02 22:39:50 +02:00

22 lines
502 B
TypeScript

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;