This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
svelte.config.js
69 lines (65 loc) · 1.97 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
60
61
62
63
64
65
66
67
68
69
import adapter from '@sveltejs/adapter-static';
import autoprefixer from 'autoprefixer';
import preprocess from 'svelte-preprocess';
const prod = process.env.NODE_ENV === 'production';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess({
postcss: {
plugins: [autoprefixer]
}
}),
kit: {
adapter: adapter({
fallback: 'index.html'
}),
serviceWorker: {
register: false
},
...(prod && {
csp: {
directives: {
'default-src': ['none'],
'img-src': [
'self',
'data:',
'blob:',
'https://cdn.deckdeckgo.com',
'https://media.tenor.com/',
'https://images.unsplash.com/',
'https://*.raw.ic0.app',
'https://*.raw.icp0.io'
],
'manifest-src': ['self'],
'style-src': ['self', 'unsafe-inline', 'https://cdn.deckdeckgo.com'],
'font-src': ['self', 'https://cdn.deckdeckgo.com'],
'script-src': [
'self',
'unsafe-eval',
'https://cdn.deckdeckgo.com/',
'https://tuwbw-byaaa-aaaad-qblpq-cai.raw.ic0.app/',
'https://tuwbw-byaaa-aaaad-qblpq-cai.raw.icp0.io/',
'{{EXTRA_SHAS}}'
],
'connect-src': [
'blob:',
'https://ic0.app',
'https://icp0.io',
'https://*.raw.ic0.app',
'https://*.raw.icp0.io',
'https://us-central1-unsplash-proxy.cloudfunctions.net/',
'https://api.tenor.com/',
'https://images.unsplash.com/',
'https://raw.githubusercontent.com/papyrs/',
'https://app.papy.rs/_app/version.json'
],
'upgrade-insecure-requests': true,
'child-src': ['self', 'blob:', 'data:']
}
}
})
}
};
export default config;