make frontend support static adapter in SPA mode

This commit is contained in:
maxDorninger
2025-07-17 15:17:40 +02:00
parent fcc84c35b1
commit 6016e3c155
2 changed files with 5 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
import adapter from '@sveltejs/adapter-node';
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
const base = process.env.BASE_URL || '';
const base = process.env.BASE_PATH || '';
/** @type {import('@sveltejs/kit').Config} */
const config = {
@@ -13,7 +13,7 @@ const config = {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter(),
adapter: adapter({fallback: '404.html'}),
paths: {
base: base
}