-
Notifications
You must be signed in to change notification settings - Fork 1
/
svelte.config.js
65 lines (54 loc) · 1.16 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
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
// cloudflare
import adapter from '@sveltejs/adapter-cloudflare';
import { mdsvex } from 'mdsvex';
import mdsvexConfig from './mdsvex.config.js';
import { getAllOPPaths } from './src/lib/server_utils.js';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: [
'.svelte',
...mdsvexConfig.extensions
],
preprocess: [
mdsvex(mdsvexConfig),
vitePreprocess(),
],
kit: {
// --------------------------------------------------- static
// adapter: adapter({
// fallback: 'index.html'
// }),
// --------------------------------------------------- cloudflare
adapter: adapter({
// See below for an explanation of these options
routes: {
include: [
'/*'
],
exclude: [
'<all>'
]
},
platformProxy: {
configPath: 'wrangler.toml',
environment: undefined,
experimentalJsonConfig: false,
persist: false
}
}),
alias: {
"@/*": "./src/lib/*",
},
prerender: {
entries: [
'*',
'/api/pages/page/*',
'/api/posts/page/*',
...getAllOPPaths()
]
},
csp: { mode: 'auto' }
},
};
export default config;