Files
EpicNext-Cms/next.config.ts
T

20 lines
455 B
TypeScript

import { execSync } from "node:child_process";
import type { NextConfig } from "next";
const getGitCommit = () => {
try {
return execSync("git rev-parse HEAD", { encoding: "utf8" }).trim();
} catch {
return undefined;
}
};
const nextConfig: NextConfig = {
deploymentId: process.env.NEXT_DEPLOYMENT_ID?.trim() || getGitCommit(),
swcMinify: true,
reactStrictMode: true,
serverExternalPackages: ["lzma", "sharp"],
};
export default nextConfig;