forked from importantimport/urara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
42 lines (41 loc) · 1.13 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
import preprocess from 'svelte-preprocess'
import adapterAuto from '@sveltejs/adapter-auto'
import adapterNode from '@sveltejs/adapter-node'
import adapterStatic from '@sveltejs/adapter-static'
import { mdsvex } from 'mdsvex'
import { mdsvexConfig } from './mdsvex.config.js'
import Icons from 'unplugin-icons/vite'
export default /** @type {import('@sveltejs/kit').Config} */ {
extensions: ['.svelte', ...mdsvexConfig.extensions],
preprocess: [
mdsvex(mdsvexConfig),
preprocess({
postcss: {
plugins: true
}
})
],
kit: {
adapter: Object.keys(process.env).some(key => ['VERCEL', 'CF_PAGES', 'NETLIFY'].includes(key))
? adapterAuto()
: process.env.ADAPTER === 'node'
? adapterNode({ out: 'build' })
: adapterStatic({
pages: 'build',
assets: 'build',
fallback: null
}),
csp: { mode: 'auto' },
vite: {
mode: process.env.MODE || 'production',
envPrefix: 'URARA_',
plugins: [
Icons({
autoInstall: true,
compiler: 'svelte',
defaultClass: 'inline-block w-6 h-6'
})
]
}
}
}