You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 lines
904 B

import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
compilerOptions: {
compatibility: {
componentApi: 4 // Enable Svelte 4 component API for dynamic mounting
}
},
kit: {
adapter: adapter({
out: 'build',
precompress: true
}),
prerender: {
handleUnseenRoutes: 'ignore',
handleHttpError: ({ path, referrer, message }) => {
// Ignore 404s for static assets during prerendering
// These will be available at runtime from the static directory
if (path === '/favicon.ico' || path === '/og-image.png') {
return;
}
// For other errors, throw to fail the build
throw new Error(`${message} (${path})`);
}
}
}
};
export default config;