Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing .rsc outputs for pages prerenders (#11503)
When generating the outputs for pages when app router is also present we weren't creating the placeholder `.rsc` outputs for all prerender outputs so when a `fallback: false` route was configured in the pages router that could fall through to an app route it causes issues with client-navigation behaving differently than a direct visit. This ensures we add the placeholder `.rsc` outputs for all prerenders so that `fallback: false` pages don't have this unexpected behavior.
- Loading branch information
Showing
5 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@vercel/next": patch | ||
--- | ||
|
||
Fix missing .rsc outputs for pages prerenders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/next/test/fixtures/00-app-dir-no-ppr/app/nested/[...rest]/page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default function Page() { | ||
return ( | ||
<p>nested app router catch-all</p> | ||
) | ||
} |
24 changes: 24 additions & 0 deletions
24
packages/next/test/fixtures/00-app-dir-no-ppr/pages/nested/blog-fallback-false/[slug].js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export default function Page(props) { | ||
return ( | ||
<> | ||
<p>hello from /nested/blog-fallback-false/[slug]</p> | ||
</> | ||
); | ||
} | ||
|
||
export function getStaticProps() { | ||
return { | ||
props: { | ||
now: Date.now() | ||
} | ||
} | ||
} | ||
|
||
export function getStaticPaths() { | ||
return { | ||
paths: [ | ||
{ params: { slug: 'first' } }, | ||
], | ||
fallback: false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters