import adapter from '@sveltejs/adapter-static'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; const missingPaths = [ "/games/swordsnstuff", "/games/magician", "/projects/tads/tads1", "/projects/tads/tads2" ] /** @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 (missingPaths.includes(path)) { return; } // otherwise fail the build throw new Error(message); }, handleMissingId: 'ignore', }, }, }; export default config;