Files
EpicNext-Cms/next.config.ts
T
openhands f31530b3d7
CI / check (push) Successful in 26s
CI / release (push) Skipped
CI / deploy (push) Successful in 47s
Optimize next.config.ts with package import optimizations
2026-08-25 22:31:05 +02:00

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;