-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
59 lines (57 loc) · 1.7 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import adapter from '@sveltejs/adapter-vercel';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { markdoc } from 'svelte-markdoc-preprocess';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
import highlighter from './src/lib/markdoc/shiki.js';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: [
vitePreprocess(),
markdoc({
tags: join(dirname(fileURLToPath(import.meta.url)), './src/lib/markdoc/tags/Tags.svelte'),
nodes: join(dirname(fileURLToPath(import.meta.url)), './src/lib/markdoc/nodes/Nodes.svelte'),
highlighter
})
],
extensions: ['.svelte', '.md'],
kit: {
adapter: adapter(),
alias: {
'@/*': './src/lib/*',
'@assets/*': './user/assets/*',
'@posts/*': './user/posts/*',
'@config': './user/config.ts',
'@uses/*': './user/uses/*',
'@experiences/*': './user/experiences/*',
'@projects/*': './user/projects/*',
'@i18n': './src/lib/paraglide/messages.js'
},
csp: {
mode: 'auto',
directives: {
'base-uri': ["'self'"],
'child-src': ["'self'"],
'connect-src': [
"'self'",
'ws://localhost:*',
'wss://ws-us3.pusher.com',
'https://sockjs-us3.pusher.com'
],
'img-src': ["'self'", 'https:'],
'font-src': ["'self'"],
'form-action': ["'self'"],
'frame-ancestors': ["'self'"],
'frame-src': ["'self'", 'https://www.youtube-nocookie.com', 'https://vercel.live'],
'manifest-src': ["'self'"],
'media-src': ["'self'", 'https:'],
'object-src': ["'none'"],
'style-src': ["'self'", "'unsafe-inline'"],
'default-src': ["'self'"],
'script-src': ["'self'", 'https://vercel.live'],
'worker-src': ["'self'"]
}
}
}
};
export default config;