Skip to content

Commit

Permalink
fix: prerender regression
Browse files Browse the repository at this point in the history
Fixes #121
  • Loading branch information
harlan-zw committed Aug 22, 2023
1 parent 89fb9e9 commit 9a1a792
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prerender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function setupPrerenderHandler(moduleConfig: ModuleOptions, buildTimeMeta
return

const prerenderUrls = (nitro._prerenderedRoutes || [])
.filter(r => r.fileName === '.html' && !r.route.startsWith('/api/'))
.filter(r => (!r.fileName || r.fileName.endsWith('.html')) && !r.route.endsWith('.html') && !r.route.startsWith('/api/'))
.map(r => ({ loc: r.route })) || []

if (buildTimeMeta.hasPrerenderedRoutesPayload) {
Expand Down

0 comments on commit 9a1a792

Please sign in to comment.