-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue where Vercel adapter may create functions for prerendere…
…d routes (#10231) * fix: fix an issue where Vercel adapter may create functions for prerendered routes * test: update test cases in `split.test.js` * chore: add changeset * refactor: apply suggested changes from code review * Apply suggestions from code review --------- Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
26 additions
and
2 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 @@ | ||
--- | ||
"@astrojs/vercel": patch | ||
--- | ||
|
||
Fixes an issue where functions were also created for prerendered routes with `functionPerRoute` enabled. |
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
12 changes: 12 additions & 0 deletions
12
packages/integrations/vercel/test/fixtures/functionPerRoute/src/pages/prerender.astro
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,12 @@ | ||
--- | ||
export const prerender = true; | ||
--- | ||
|
||
<html> | ||
<head> | ||
<title>Prerendered Page</title> | ||
</head> | ||
<body> | ||
<h1>Prerendered Page</h1> | ||
</body> | ||
</html> |
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