-
-
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: client-side trailing slash redirect when preloading data (#8982)
* add client-side trailing slash redirect * lint * edit comment * add comments
- Loading branch information
1 parent
262b01b
commit bfa2b6e
Showing
11 changed files
with
47 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: client-side trailing slash redirect when preloading data |
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
1 change: 1 addition & 0 deletions
1
packages/kit/test/apps/basics/src/routes/routing/trailing-slash/+layout.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 @@ | ||
export const ssr = false; |
13 changes: 13 additions & 0 deletions
13
packages/kit/test/apps/basics/src/routes/routing/trailing-slash/+layout.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,13 @@ | ||
<script> | ||
import { page } from '$app/stores'; | ||
</script> | ||
|
||
<ul data-sveltekit-preload-data="hover"> | ||
<li><a href="/routing/trailing-slash/always">/always</a></li> | ||
<li><a href="/routing/trailing-slash/ignore/">/ignore/</a></li> | ||
<li><a href="/routing/trailing-slash/never/">/never/</a></li> | ||
</ul> | ||
|
||
<p>{$page.url.pathname}</p> | ||
|
||
<slot /> |
Empty file.
1 change: 1 addition & 0 deletions
1
packages/kit/test/apps/basics/src/routes/routing/trailing-slash/always/+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 @@ | ||
export const trailingSlash = 'always'; |
Empty file.
1 change: 1 addition & 0 deletions
1
packages/kit/test/apps/basics/src/routes/routing/trailing-slash/ignore/+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 @@ | ||
export const trailingSlash = 'ignore'; |
Empty file.
Empty file.
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