generated from ryanatkn/fuz_template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
39 lines (38 loc) · 1.31 KB
/
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
import {vitePreprocess} from '@sveltejs/vite-plugin-svelte';
import adapter from '@sveltejs/adapter-static';
/** @type {import('@sveltejs/kit').Config} */
export default {
preprocess: [vitePreprocess()],
compilerOptions: {runes: true},
vitePlugin: {inspector: true},
kit: {
adapter: adapter(),
paths: {relative: false}, // use root-absolute paths: https://kit.svelte.dev/docs/configuration#paths
alias: {$routes: 'src/routes'},
csp: {
directives: {
// TODO improve the CSP, is unsafe - https://github.com/ryanatkn/ryanatkn.com/pull/12
// 'default-src': ['self'],
// 'script-src': ['self'],
'connect-src': ['self', 'https://hci.social/'],
'style-src': ['self', 'unsafe-inline'], // support Svelte transitions - https://kit.svelte.dev/docs/configuration#csp
'img-src': [
'self',
'unsafe-inline', // TODO ideally this wouldn't be needed, added for Svelte
'https://*.ryanatkn.com/',
'https://*.spiderspace.org/',
'https://*.webdevladder.net/',
'https://*.dealt.dev/',
'https://*.fuz.dev/',
'https://*.ztack.net/',
'https://*.grogarden.org/',
'https://*.zzzbot.dev/',
'https://*.cosmicplayground.org/',
'https://ryanatkn.github.io/',
'https://hci.social/',
'https://storage.googleapis.com/hci-social-storage/',
],
},
},
},
};