Skip to content

Commit

Permalink
Make Missing Prerender Manifest Fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Feb 10, 2020
1 parent f25da29 commit 4ff60c7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/next/build/index.ts
Expand Up @@ -801,6 +801,17 @@ export default async function build(dir: string, conf = null): Promise<void> {
dynamicRoutes: finalDynamicRoutes,
}

await fsWriteFile(
path.join(distDir, PRERENDER_MANIFEST),
JSON.stringify(prerenderManifest),
'utf8'
)
} else {
const prerenderManifest: PrerenderManifest = {
version: 1,
routes: {},
dynamicRoutes: {},
}
await fsWriteFile(
path.join(distDir, PRERENDER_MANIFEST),
JSON.stringify(prerenderManifest),
Expand Down

0 comments on commit 4ff60c7

Please sign in to comment.