Skip to content

Commit 56f7d17

Browse files
committed
add build_id to define
1 parent b0280bb commit 56f7d17

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/cloudflare/src/cli/build/bundle-server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { readFile, writeFile } from "node:fs/promises";
33
import path from "node:path";
44
import { fileURLToPath } from "node:url";
55

6+
import { loadBuildId } from "@opennextjs/aws/adapters/config/util.js";
67
import { type BuildOptions, getPackagePath } from "@opennextjs/aws/build/helper.js";
78
import { ContentUpdater } from "@opennextjs/aws/plugins/content-updater.js";
89
import { build, type Plugin } from "esbuild";
@@ -146,6 +147,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
146147
"process.env.TURBOPACK": "false",
147148
// This define should be safe to use for Next 14.2+, earlier versions (13.5 and less) will cause trouble
148149
"process.env.__NEXT_EXPERIMENTAL_REACT": `${needsExperimentalReact(nextConfig)}`,
150+
"process.env__NEXT_BUILD_ID": JSON.stringify(loadBuildId(baseManifestPath)),
149151
},
150152
banner: {
151153
// We need to import them here, assigning them to `globalThis` does not work because node:timers use `globalThis` and thus create an infinite loop

0 commit comments

Comments
 (0)