Files
pages/svelte.config.js

31 lines
730 B
JavaScript
Raw Normal View History

2025-03-31 19:03:23 +02:00
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
2025-03-31 23:07:29 +02:00
/** @type {import('@sveltejs/kit').Config} */
2025-03-31 19:03:23 +02:00
const config = {
// preprocess: vitePreprocess(),
2025-03-31 23:07:29 +02:00
kit: {
adapter: adapter({
pages: 'build',
assets: 'build',
fallback: undefined,
preprocess: false,
strict: true,
}),
2025-04-04 20:28:38 +02:00
prerender: {
handleHttpError: ({ path, referrer, message }) => {
// ignore deliberate link to shiny 404 page
if (path === '/games/swordsnstuff' || path === '/projects/tads/tads1' || path === '/projects/tads/tads2') {
2025-04-04 20:28:38 +02:00
return;
}
// otherwise fail the build
throw new Error(message);
},
handleMissingId: 'ignore',
},
2025-03-31 23:07:29 +02:00
},
2025-03-31 19:03:23 +02:00
};
export default config;