-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
38 lines (36 loc) · 1015 Bytes
/
svelte.config.js
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
34
35
36
37
38
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import adapter from '@sveltejs/adapter-vercel';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: [vitePreprocess()],
kit: {
adapter: adapter(),
csp: {
directives: {
'default-src': ['self', 'vitals.vercel-insights.com'],
'img-src': [
'self',
'data:',
'https://pbs.twimg.com/profile_banners/1398377057772470274/1623818332/*',
'vitals.vercel-insights.com'
],
'style-src': ['self', 'unsafe-inline', 'vitals.vercel-insights.com'],
'script-src-elem': ['self', 'va.vercel-scripts.com']
}
},
prerender: {
handleHttpError: ({ status, path, referrer, referenceType, message }) => {
const errorMessage =
message.length > 0
? message
: `${status} ${path}${referrer ? ` (${referenceType} from ${referrer})` : ''}`;
throw new Error(errorMessage);
}
},
version: {
name: Date.now().toString(),
pollInterval: 0
}
}
};
export default config;