Files
cv/svelte.config.js
Joakim Repomaa 72a636d175 initial commit
2026-02-17 02:15:25 +02:00

35 lines
862 B
JavaScript

import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter({
pages: 'build',
assets: 'build',
precompress: false,
strict: false,
}),
prerender: {
entries: ['/', '/print'],
handleHttpError: ({ path, message }) => {
// Ignore 404s for cv.pdf (generated after build) and static files
if (path === '/cv.pdf' || path.startsWith('/admin/')) {
return;
}
console.warn(`Prerender error for ${path}: ${message}`);
},
handleMissingId: () => {
// Ignore missing IDs for hash links
return;
},
},
alias: {
$lib: './src/lib',
},
},
};
export default config;