forked from PenguinMod/PenguinMod-Home
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvelte.config.js
More file actions
30 lines (28 loc) · 950 Bytes
/
Copy pathsvelte.config.js
File metadata and controls
30 lines (28 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import adapter from '@sveltejs/adapter-static';
export default {
kit: {
adapter: adapter({
// default options are shown. On some platforms
// these options are set automatically — see below
pages: 'public',
assets: 'public',
fallback: '404.html',
precompress: false,
strict: true
}),
prerender: {
handleHttpError: ({ path, referrer, message }) => {
// https://svelte.dev/docs/kit/configuration#prerender
if (path && path.startsWith("/api")) return; // whatever bro js render
switch (path) {
case "/error":
case "/contact.html":
return;
}
// otherwise fail the build
throw new Error(message);
}
}
},
//preprocess: [vitePreprocess()]
};