22 lines
514 B
TypeScript
22 lines
514 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(),
|
|
reactStrictMode: true,
|
|
serverExternalPackages: ["lzma", "sharp"],
|
|
experimental: {
|
|
optimizePackageImports: ["lucide-react", "date-fns"],
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|