mirror of
https://github.com/ClipFusion-org/clipfusion.git
synced 2025-08-03 15:55:07 +00:00
22 lines
598 B
TypeScript
22 lines
598 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const generateGitCommitHash = () => {
|
|
if (process.env.NODE_ENV === "development") return "development server";
|
|
if (!process.env.GIT_COMMIT) return "git commit hash is unavailable";
|
|
const hash = process.env.GIT_COMMIT;
|
|
if (!hash || hash.trim().length == 0) return "empty git commit hash";
|
|
return hash;
|
|
}
|
|
|
|
const gitCommitHash = generateGitCommitHash();
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
generateBuildId: () => gitCommitHash,
|
|
env: {
|
|
BUILD_ID_ENV: gitCommitHash
|
|
}
|
|
};
|
|
|
|
export default nextConfig;
|