-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathunocss.config.ts
More file actions
31 lines (27 loc) · 845 Bytes
/
unocss.config.ts
File metadata and controls
31 lines (27 loc) · 845 Bytes
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
import {
defineConfig,
presetUno,
presetAttributify,
presetIcons,
presetWebFonts,
} from 'unocss'
import transformerDirectives from '@unocss/transformer-directives'
import transformerVariantGroup from '@unocss/transformer-variant-group'
import transformerAttributifyJsx from '@unocss/transformer-attributify-jsx'
export function createConfig({ strict = true, dev = true } = {}) {
return defineConfig({
envMode: dev ? 'dev' : 'build',
presets: [
presetUno(),
presetAttributify({ strict }),
presetIcons({ autoInstall: true }),
presetWebFonts({ fonts: { sans: 'Inter:100,200,500,400,700,800' } }),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
transformerAttributifyJsx()
],
});
}
export default createConfig();