Files
pages/svelte.config.js
2025-04-04 20:28:38 +02:00

31 lines
724 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({
pages: 'build',
assets: 'build',
fallback: undefined,
preprocess: false,
strict: true,
}),
prerender: {
handleHttpError: ({ path, referrer, message }) => {
// ignore deliberate link to shiny 404 page
if (path === '/swordsnstuff' || path === '/projects/tads/tads1' || path === '/projects/tads/tads2') {
return;
}
// otherwise fail the build
throw new Error(message);
},
handleMissingId: 'ignore',
},
},
};
export default config;