/
uno.config.ts
37 lines (36 loc) · 886 Bytes
/
uno.config.ts
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
import {
defineConfig,
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
export default defineConfig({
shortcuts: [
['flex-center', 'flex items-center justify-center'],
['flex-x-center', 'flex justify-center'],
['flex-y-center', 'flex items-center'],
['transition-base', 'transition duration-300'],
['wh-full', 'w-full h-full'],
],
presets: [
presetUno(),
// 想全走 CDN 加载图标,就把这个注掉,详细去看 index.html
presetIcons({
scale: 1.2,
warn: true,
cdn: 'https://esm.sh/',
}),
presetTypography(),
presetWebFonts({
fonts: {
sans: 'DM Sans',
serif: 'DM Serif Display',
mono: 'DM Mono',
},
}),
],
transformers: [transformerDirectives(), transformerVariantGroup()],
})