Fix deploymentId in next.config.ts
This commit is contained in:
1 parent
e06596391e
commit
f63ca708fe
1 file changed
+11
-1
+11
-1
@@ -1,7 +1,17 @@
|
|||||||
|
import { execSync } from "node:child_process";
|
||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
|
||||||
|
const getGitCommit = () => {
|
||||||
|
try {
|
||||||
|
return execSync("git rev-parse HEAD", { encoding: "utf8" }).trim();
|
||||||
|
} catch {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
serverExternalPackages: ["lzma-js"],
|
deploymentId: process.env.NEXT_DEPLOYMENT_ID?.trim() || getGitCommit(),
|
||||||
|
serverExternalPackages: ["lzma"],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
Reference in new issue
Block a user