-
Notifications
You must be signed in to change notification settings - Fork 4
/
svelte.config.js
42 lines (39 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
39
40
41
42
import sveltePreprocess from 'svelte-preprocess';
import adapter from '@sveltejs/adapter-static';
import path from 'path';
const preprocess = [
sveltePreprocess({
postcss: true,
preserve: ['ld+json'],
}),
];
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: preprocess,
kit: {
adapter: adapter(),
alias: {
$src: path.resolve('./src'),
$lib: path.resolve('./src/lib'),
},
csp: {
mode: 'auto',
directives: {
'default-src': ['none'],
'script-src': ['self'],
'connect-src': [
'self',
'ws://localhost:3000',
'https://api.spotify.com',
],
'img-src': ['self', 'data:', 'blob:'],
'style-src': ['self', 'unsafe-inline', 'https://fonts.googleapis.com'],
'base-uri': ['self'],
'font-src': ['self', 'https://fonts.gstatic.com'],
'child-src': ['self', 'blob:'],
'form-action': ['self'],
},
},
},
};
export default config;