generated from importantimport/urara
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
49 lines (48 loc) · 1.48 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
import preprocess from 'svelte-preprocess'
import adapterAuto from '@sveltejs/adapter-auto'
import adapterNode from '@sveltejs/adapter-node'
import adapterStatic from '@sveltejs/adapter-static'
import mdsvexConfig from './mdsvex.config.js'
import postcss from './postcss.config.js'
import UnoCSS from 'unocss/vite'
import { extractorSvelte } from '@unocss/core'
import { presetIcons } from 'unocss'
import { mdsvex } from 'mdsvex'
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: [
UnoCSS({
extractors: [extractorSvelte],
presets: [
presetIcons({
customizations: {
iconCustomizer: (_collection, _icon, props) => {
props.height = '1.5rem'
props.width = '1.5rem'
return props
}
}
})
]
})
]
}
}
}