sparse desktop build

This commit is contained in:
vcoppe committed 2026-10-18 16:53:39 +02:00
1 parent 6556c29492
commit 741d35db1e
5 files changed
+57 -5

No files matched your search

+6 -1
View File
@@ -7,6 +7,9 @@ const mdsvexOptions = {
extensions: ['.mdx'],
};
/** Whether the website is built for the desktop app (`npm run build:desktop`), which only has the app. */
const desktop = process.env.BUILD_TARGET === 'desktop';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', ...mdsvexOptions.extensions],
@@ -23,7 +26,9 @@ const config = {
relative: false,
},
prerender: {
crawl: true,
// the desktop app only has the pages of the app, the others are left empty (vite.config.ts)
crawl: !desktop,
handleUnseenRoutes: desktop ? 'ignore' : 'fail',
},
},
};