generated from importantimport/urara
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
38 lines (37 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
import preprocess from 'svelte-preprocess'
import adapterAuto from '@sveltejs/adapter-auto'
import adapterNode from '@sveltejs/adapter-node'
import adapterStatic from '@sveltejs/adapter-static'
import Icons from 'unplugin-icons/vite'
import { mdsvex } from 'mdsvex'
import mdsvexConfig from './mdsvex.config.js'
import postcss from './postcss.config.js'
export default /** @type {import('@sveltejs/kit').Config} */ {
extensions: ['.svelte', ...mdsvexConfig.extensions],
preprocess: [mdsvex(mdsvexConfig), preprocess()],
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' },
prerender: { default: true },
vite: {
mode: process.env.MODE || 'production',
envPrefix: 'URARA_',
css: { postcss },
plugins: [
Icons({
autoInstall: true,
compiler: 'svelte',
defaultClass: 'inline-block w-6 h-6'
})
]
}
}
}