From 4ddcd3ee25b7d78ea3c1439a70e990d6982c0d35 Mon Sep 17 00:00:00 2001 From: xyroscar Date: Fri, 28 Nov 2025 04:19:59 -0800 Subject: [PATCH] fixing tauri build static adapter issue. added fallback configuration for SPA routing --- src/routes/workspaces/[id]/+page.ts | 2 ++ svelte.config.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 src/routes/workspaces/[id]/+page.ts diff --git a/src/routes/workspaces/[id]/+page.ts b/src/routes/workspaces/[id]/+page.ts new file mode 100644 index 0000000..db690ca --- /dev/null +++ b/src/routes/workspaces/[id]/+page.ts @@ -0,0 +1,2 @@ +// Dynamic routes cannot be prerendered since the IDs are not known at build time +export const prerender = false; diff --git a/svelte.config.js b/svelte.config.js index 2d45f91..35f34a8 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -8,7 +8,9 @@ import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; const config = { preprocess: vitePreprocess(), kit: { - adapter: adapter(), + adapter: adapter({ + fallback: "index.html", + }), }, };