-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsvelte.config.js
38 lines (35 loc) · 1.12 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
import adapter from '@sveltejs/adapter-node';
import preprocess from 'svelte-preprocess';
import sass from 'sass';
import { readdirSync } from 'fs';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess({
sass,
postcss: true
}),
kit: {
adapter: adapter(),
prerender: {
entries: readdirSync('./src/pages').map((v) => `/${v.replace('.md', '')}`)
},
csp: {
directives: {
'require-trusted-types-for': ['script'],
'trusted-types': ['matomo-policy', 'dompurify', 'default'],
'default-src': ['none'],
'frame-ancestors': ['none'],
'base-uri': ['none'],
'img-src': ['self', process.env.PUBLIC_ASSETS_PATH, 'data:'],
'font-src': ['self'],
'style-src': ['self', 'unsafe-inline'],
'form-action': ['self', 'https://checkout.stripe.com'],
'connect-src': ['self', 'https://analytics.brave.com'],
'script-src': ['self', 'https://analytics.brave.com']
}
}
}
};
export default config;