-
Notifications
You must be signed in to change notification settings - Fork 0
/
uno.config.ts
48 lines (46 loc) · 1.41 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
import { defineConfig, presetAttributify, presetIcons, presetTypography, presetUno, transformerDirectives, transformerVariantGroup } from 'unocss'
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders'
import presetWeapp from 'unocss-preset-weapp'
import { transformerAttributify, transformerClass } from 'unocss-preset-weapp/transformer'
export default defineConfig({
shortcuts: [
{
'border-base': 'border-gray-200 dark:border-dark-200',
'bg-base': 'bg-white dark:bg-dark-100',
'color-base': 'text-gray-900 dark:text-gray-300',
'color-fade': 'text-gray-900:50 dark:text-gray-300:50',
},
],
rules: [],
presets: [
presetUno({
preflight: false,
}),
presetWeapp({
isH5: process.env.TARO_ENV === 'h5',
platform: 'taro',
taroWebpack: 'webpack5',
whRpx: false,
}),
presetAttributify(),
presetIcons({
collections: {
carbon: () => import('@iconify-json/carbon/icons.json').then(i => i.default),
mdi: () => import('@iconify-json/mdi/icons.json').then(i => i.default),
my: FileSystemIconLoader(
'./src/icons',
svg => svg.replace(/#fff/, 'currentColor'),
),
},
scale: 1.2,
warn: true,
}),
presetTypography(),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
transformerAttributify(),
transformerClass(),
],
})