Skip to content

Commit b3f5202

Browse files
committed
svelte: Use SPA mode
This should make the migration a bit easier for now. We can go back to SSR rendering in the future once SPA mode works sufficiently well.
1 parent 0db5d67 commit b3f5202

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"devDependencies": {
1919
"@eslint/compat": "^1.4.0",
2020
"@eslint/js": "^9.39.1",
21-
"@sveltejs/adapter-auto": "^7.0.0",
21+
"@sveltejs/adapter-static": "^3.0.10",
2222
"@sveltejs/kit": "^2.49.1",
2323
"@sveltejs/vite-plugin-svelte": "^6.2.1",
2424
"@types/node": "^24",

svelte/src/routes/+layout.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const ssr = false;

svelte/svelte.config.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import adapter from '@sveltejs/adapter-auto';
1+
import adapter from '@sveltejs/adapter-static';
22
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
33

44
/** @type {import('@sveltejs/kit').Config} */
@@ -8,10 +8,11 @@ const config = {
88
preprocess: vitePreprocess(),
99

1010
kit: {
11-
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
12-
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
13-
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
14-
adapter: adapter(),
11+
adapter: adapter({
12+
// https://svelte.dev/docs/kit/single-page-apps#Usage recommends to
13+
// avoid using `index.html` as a fallback page, so we use `200.html` instead.
14+
fallback: '200.html',
15+
}),
1516
},
1617
};
1718

0 commit comments

Comments
 (0)