Files
aigc-home/calliope-web/svelte.config.js
T
Benjiyaya cfc13f4aee Stop offering a Windows zip while Create Project 404s.
The packaged FastAPI static mount returned JSON 404 for /project/{id}. Serve the SvelteKit fallback page for client routes, and point README at source until a zip is trustworthy.
2026-08-25 20:12:08 +08:00

27 lines
644 B
JavaScript

import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter({
fallback: 'index.html',
}),
paths: {
base: '',
// Absolute /_app/... URLs so a document load of /project/12 still
// finds the bundle. adapter-static otherwise emits ./_app on prerendered pages.
relative: false,
},
prerender: {
handleHttpError: ({ path, message }) => {
if (path === '/favicon.png') return;
throw new Error(message);
},
},
},
};
export default config;