Adjust prerender handling for prod build

This commit is contained in:
pleb 2025-10-30 09:59:15 -07:00
parent 47e670e488
commit d7af7d00b6

View File

@ -6,7 +6,18 @@ const config = {
// Consult https://svelte.dev/docs/kit/integrations // Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors // for more information about preprocessors
preprocess: vitePreprocess(), 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; export default config;