Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Apr 5, 2024
1 parent e1b69e8 commit cf2f685
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ async function writePrerenderManifest(

async function writeEdgePartialPrerenderManifest(
distDir: string,
manifest: Readonly<PrerenderManifest>
manifest: Readonly<Partial<PrerenderManifest>>
): Promise<void> {
// We need to write a partial prerender manifest to make preview mode settings available in edge middleware.
// Use env vars in JS bundle and inject the actual vars to edge manifest.
const edgePartialPrerenderManifest: PrerenderManifest = {
const edgePartialPrerenderManifest: Partial<PrerenderManifest> = {
...manifest,
preview: {
previewModeId: 'process.env.__NEXT_PREVIEW_MODE_ID',
Expand Down Expand Up @@ -1238,7 +1238,7 @@ export default async function build(
.traceChild('write-routes-manifest')
.traceAsyncFn(() => writeManifest(routesManifestPath, routesManifest))

await writeEdgePartialPrerenderManifest(distDir)
await writeEdgePartialPrerenderManifest(distDir, {})

const outputFileTracingRoot =
config.experimental.outputFileTracingRoot || dir
Expand Down

0 comments on commit cf2f685

Please sign in to comment.