Skip to content

Commit 8810a87

Browse files
committed
fixup
1 parent 089c708 commit 8810a87

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/next/src/build/index.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,16 +1931,15 @@ export default async function build(
19311931
)
19321932
// If there's edge routes, append the edge instrumentation hook
19331933
// Turbopack generates this chunk with a hashed name and references it in middleware-manifest.
1934+
let edgeInstrumentationHook = path.join(
1935+
SERVER_DIRECTORY,
1936+
`edge-${INSTRUMENTATION_HOOK_FILENAME}.js`
1937+
)
19341938
if (
19351939
bundler !== Bundler.Turbopack &&
1936-
(edgeRuntimeAppCount || edgeRuntimePagesCount)
1940+
existsSync(path.join(distDir, edgeInstrumentationHook))
19371941
) {
1938-
serverFilesManifest.files.push(
1939-
path.join(
1940-
SERVER_DIRECTORY,
1941-
`edge-${INSTRUMENTATION_HOOK_FILENAME}.js`
1942-
)
1943-
)
1942+
serverFilesManifest.files.push(edgeInstrumentationHook)
19441943
}
19451944
}
19461945

0 commit comments

Comments
 (0)