Skip to content

Commit fa6b132

Browse files
committed
use already defined env variable
1 parent bb271d1 commit fa6b132

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ 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";
76
import { type BuildOptions, getPackagePath } from "@opennextjs/aws/build/helper.js";
87
import { ContentUpdater } from "@opennextjs/aws/plugins/content-updater.js";
98
import { build, type Plugin } from "esbuild";
@@ -147,7 +146,6 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
147146
"process.env.TURBOPACK": "false",
148147
// This define should be safe to use for Next 14.2+, earlier versions (13.5 and less) will cause trouble
149148
"process.env.__NEXT_EXPERIMENTAL_REACT": `${needsExperimentalReact(nextConfig)}`,
150-
"process.env.__NEXT_BUILD_ID": JSON.stringify(loadBuildId(baseManifestPath)),
151149
},
152150
banner: {
153151
// We need to import them here, assigning them to `globalThis` does not work because node:timers use `globalThis` and thus create an infinite loop

packages/cloudflare/src/cli/build/patches/plugins/load-manifest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function loadManifest($PATH, $$$ARGS) {
6464
fix: `
6565
function loadManifest($PATH, $$$ARGS) {
6666
if ($PATH === "/.next/BUILD_ID") {
67-
return process.env.__NEXT_BUILD_ID;
67+
return process.env.NEXT_BUILD_ID;
6868
}
6969
$PATH = $PATH.replaceAll(${JSON.stringify(sep)}, ${JSON.stringify(posix.sep)});
7070
${returnManifests}

0 commit comments

Comments
 (0)