You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
13
13
14
14
## Checklist
15
15
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.
17
18
- Use `build/` as `frontendDist` in `tauri.conf.json`.
18
19
19
20
## Example Configuration
@@ -112,7 +113,9 @@ SvelteKit is a meta framework for Svelte. Learn more about SvelteKit at https://
112
113
preprocess:vitePreprocess(),
113
114
114
115
kit: {
115
-
adapter:adapter(),
116
+
adapter:adapter({
117
+
fallback:'index.html',
118
+
}),
116
119
},
117
120
};
118
121
@@ -121,11 +124,10 @@ SvelteKit is a meta framework for Svelte. Learn more about SvelteKit at https://
121
124
122
125
1.##### Disable SSR
123
126
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:
0 commit comments