-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsvelte.config.js
executable file
·53 lines (51 loc) · 1.21 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
// import adapter from '@sveltejs/adapter-node'
// import adapter from '@sveltejs/adapter-vercel'
import adapter from '@sveltejs/adapter-cloudflare'
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
import { join } from 'path'
import 'dotenv/config'
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.md'],
preprocess: [
vitePreprocess({
style: {
css: {
postcss: join(process.cwd(), 'postcss.config.cjs')
}
}
})
],
kit: {
// uncomment for Cloudflare
adapter: adapter({
routes: {
include: ['/*'],
exclude: [
'/img/*',
'/vid/*',
'/crossdomain.xml',
'/favicon.ico',
'/logo.png',
'/logo.svg',
'/robots.txt'
],
}
}),
// uncomment for Node or Vercel
// adapter: adapter(),
alias: {
'$src/*': 'src/*'
},
// csp: {
// directives: {
// 'script-src': ['self', 'https://laroastingco.com/', 'https://challenges.cloudflare.com/', 'https://js.stripe.com/'],
// 'img-src': ['self', 'https://laroastingco.com/', 'data:', process.env.ORIGIN, 'https://challenges.cloudflare.com/', 'https://js.stripe.com/'],
// }
// },
// csrf: {
// checkOrigin: false,
// }
},
}
export default config