fix pdf building

This commit is contained in:
Joakim Repomaa
2026-02-19 13:13:52 +02:00
parent 209770e8aa
commit 50af9cae3e
14 changed files with 493 additions and 278 deletions

View File

@@ -5,26 +5,7 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
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;
},
},
adapter: adapter({}),
alias: {
$lib: './src/lib',
},