This repository has been archived by the owner on Jan 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
64 lines (60 loc) · 1.86 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
import adapter from '@sveltejs/adapter-vercel';
import { extractorSvelte } from '@unocss/core';
import sveltePreprocess from 'svelte-preprocess';
import {
presetAttributify,
presetIcons,
presetTagify,
presetUno,
transformerDirectives,
transformerVariantGroup
} from 'unocss';
import UnoCss from 'unocss/vite';
import { componentsShortcuts } from './src/lib/theme/unocss/shortcuts/components.js';
import { defaultShortcuts } from './src/lib/theme/unocss/shortcuts/default.js';
import { layoutShortcuts } from './src/lib/theme/unocss/shortcuts/layout.js';
import { utilitiesShortcuts } from './src/lib/theme/unocss/shortcuts/utilities.js';
import { theme } from './src/lib/theme/unocss/theme/theme.js';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: sveltePreprocess(),
kit: {
adapter: adapter(),
vite: {
define: {
'process.env': process.env
},
plugins: [
UnoCss({
extractors: [extractorSvelte],
transformers: [transformerDirectives(), transformerVariantGroup()],
theme,
shortcuts: [...defaultShortcuts, ...layoutShortcuts, ...componentsShortcuts, ...utilitiesShortcuts],
presets: [
presetIcons({
prefix: 'icon-',
extraProperties: {
display: 'inline-block',
'vertical-align': 'middle'
},
scale: 1.1
}),
presetUno(),
presetAttributify({
prefix: 'ui-',
prefixedOnly: true,
strict: true
}),
presetTagify()
]
})
],
optimizeDeps: {
include: ['highlight.js', 'highlight.js/lib/core']
}
}
}
};
export default config;