Skip to content

Commit 76e41a6

Browse files
docs: update Svelte recommendation (#4085)
* docs: update Svelte recommendation * Update routing.mdx * Update changelog.mdx * Updated changelog --------- Co-authored-by: Lea Anthony <[email protected]>
1 parent 471a50c commit 76e41a6

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

website/src/pages/changelog.mdx

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414

1515
## [Unreleased]
1616

17+
### Changed
18+
- Updated recommendation for Svelte router in [#4085](https://github.com/wailsapp/wails/pull/4085) by [@benmccann](https://github.com/benmccann)
19+
20+
1721
## v2.10.1 - 2025-02-24
1822

1923
### Fixed

website/versioned_docs/version-v2.10/guides/routing.mdx

+5-15
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,11 @@ ReactDOM.render(
4848

4949
## Svelte
5050

51-
The recommended approach for routing in Svelte is [svelte-spa-router](https://github.com/ItalyPaleAle/svelte-spa-router):
51+
The recommended approach for routing in Svelte is [SvelteKit's adapter-static with SPA configuration](https://svelte.dev/docs/kit/single-page-apps):
5252

5353
```svelte
54-
<script>
55-
import Router from "svelte-spa-router";
56-
</script>
57-
58-
<Router
59-
routes={{
60-
"/": Home,
61-
"/products": wrap({
62-
asyncComponent: () => import("./routes/Products.svelte"),
63-
}),
64-
"/settings": Settings,
65-
"*": NotFound,
66-
}}
67-
/>
54+
export const prerender = true;
55+
export const ssr = false;
6856
```
57+
58+
See [the guide](sveltekit) for full details.

0 commit comments

Comments
 (0)