Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 06d4edb

Browse files
authored
fix(lambda-at-edge): non-dynamic routes for rewrite should not include routes in prerender manifest (#700)
1 parent d10cc5c commit 06d4edb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/libs/lambda-at-edge/src/default-handler.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,7 @@ const handleOriginRequest = async ({
282282

283283
// Check for non-dynamic pages before rewriting
284284
let isNonDynamicRoute =
285-
pages.html.nonDynamic[uri] ||
286-
pages.ssr.nonDynamic[uri] ||
287-
prerenderManifest.routes[uri] ||
288-
isPublicFile;
285+
pages.html.nonDynamic[uri] || pages.ssr.nonDynamic[uri] || isPublicFile;
289286

290287
// Handle custom rewrites, but don't rewrite non-dynamic pages or public files per Next.js docs: https://nextjs.org/docs/api-reference/next.config.js/rewrites
291288
if (!isNonDynamicRoute) {

0 commit comments

Comments
 (0)