-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prerender data when there's no server load but
trailingSlash
o…
…ption is set from the server (#13262) fixes #13255 trailingSlash is evaluated on the client by making a server call, so we need to prerender it
- Loading branch information
1 parent
48d2aae
commit 80a9e83
Showing
6 changed files
with
38 additions
and
1 deletion.
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 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
fix: prerender data when there is no server load but the `trailingSlash` option is set from the server |
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/kit/test/apps/options-2/src/routes/trailing-slash-server/+page.svelte
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 @@ | ||
<script> | ||
import { base } from '$app/paths'; | ||
</script> | ||
|
||
<a href="{base}/trailing-slash-server/prerender">{base}/trailing-slash-server/prerender</a> |
2 changes: 2 additions & 0 deletions
2
packages/kit/test/apps/options-2/src/routes/trailing-slash-server/prerender/+page.server.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,2 @@ | ||
export const trailingSlash = 'always'; | ||
export const prerender = true; |
5 changes: 5 additions & 0 deletions
5
packages/kit/test/apps/options-2/src/routes/trailing-slash-server/prerender/+page.svelte
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 @@ | ||
<script> | ||
import { page } from '$app/state'; | ||
</script> | ||
|
||
<h2>{page.url.pathname}</h2> |
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