Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

add +layout.ts to configure SPA mode for Tauri with static adapter

Tonho732ec256efcf
diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts
new file mode 100644
index 00000000..9d248990
--- /dev/null
+++ b/src/routes/+layout.ts
@@ -0,0 +1,5 @@
+// Tauri doesn't have a Node.js server to do proper SSR
+// so we use adapter-static with a fallback to index.html to put the site in SPA mode
+// See: https://svelte.dev/docs/kit/single-page-apps
+// See: https://v2.tauri.app/start/frontend/sveltekit/ for more info
+export const ssr = false;