diff --git a/svelte.config.js b/svelte.config.js index ac5fe8b..8ab3fe4 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -6,7 +6,18 @@ const config = { // Consult https://svelte.dev/docs/kit/integrations // for more information about preprocessors preprocess: vitePreprocess(), - kit: { adapter: adapter() } + kit: { + adapter: adapter(), + prerender: { + handleHttpError: ({ status, path }) => { + if (status === 404) { + console.warn(`Skipping prerender of ${path} (expected 404)`); + return; + } + throw new Error(`${status} ${path}`); + } + } + } }; export default config;