-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy pathsvelte.config.js
More file actions
33 lines (31 loc) · 1.19 KB
/
Copy pathsvelte.config.js
File metadata and controls
33 lines (31 loc) · 1.19 KB
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
31
32
33
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
if (path && path.includes("https://")) return; // whatever bro js render
if (path && path.includes("https:.webp")) return; // whatever bro js render
if (path && path.includes("https:.png")) return; // whatever bro js render
switch (path) {
case "/error":
case "/contact.html":
return;
}
// otherwise fail the build
throw new Error(message);
}
}
},
//preprocess: [vitePreprocess()]
};