Skip to content

Commit 1934c5d

Browse files
fix(docs): update sveltekit docs (#3249)
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
1 parent a2c0493 commit 1934c5d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/content/docs/start/frontend/sveltekit.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ tableOfContents:
99
import { Tabs, TabItem, Steps } from '@astrojs/starlight/components';
1010
import CommandTabs from '@components/CommandTabs.astro';
1111

12-
SvelteKit is a meta framework for Svelte. Learn more about SvelteKit at https://kit.svelte.dev/. This guide is accurate as of SvelteKit 2.5.7 / Svelte 4.2.15.
12+
SvelteKit is a meta framework for Svelte. Learn more about SvelteKit at https://kit.svelte.dev/. This guide is accurate as of SvelteKit 2.20.4 / Svelte 5.25.8.
1313

1414
## Checklist
1515

16-
- Use [SSG](https://kit.svelte.dev/docs/adapter-static) and/or [SPA](https://kit.svelte.dev/docs/single-page-apps) via `static-adapter`. Tauri doesn't support server-based solutions.
16+
- Use [SSG](https://kit.svelte.dev/docs/adapter-static) and [SPA](https://svelte.dev/docs/kit/single-page-apps) via `static-adapter`. Tauri doesn't support server-based solutions.
17+
- If using SSG **with prerendering**, be aware that `load` functions will not have access to tauri APIs during the build process of your app. Using SPA mode (without prerendering) is recommended since the load functions will only run in the webview with access to tauri APIs.
1718
- Use `build/` as `frontendDist` in `tauri.conf.json`.
1819

1920
## Example Configuration
@@ -112,7 +113,9 @@ SvelteKit is a meta framework for Svelte. Learn more about SvelteKit at https://
112113
preprocess: vitePreprocess(),
113114

114115
kit: {
115-
adapter: adapter(),
116+
adapter: adapter({
117+
fallback: 'index.html',
118+
}),
116119
},
117120
};
118121

@@ -121,11 +124,10 @@ SvelteKit is a meta framework for Svelte. Learn more about SvelteKit at https://
121124

122125
1. ##### Disable SSR
123126

124-
Lastly, we need to disable SSR and enable prerendering by adding a root `+layout.ts` file (or `+layout.js` if you are not using TypeScript) with these contents:
127+
Lastly, we need to disable SSR by adding a root `+layout.ts` file (or `+layout.js` if you are not using TypeScript) with these contents:
125128

126129
```ts
127130
// src/routes/+layout.ts
128-
export const prerender = true;
129131
export const ssr = false;
130132
```
131133

0 commit comments

Comments
 (0)