-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunocss.config.js
36 lines (31 loc) · 914 Bytes
/
unocss.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
import presetWeapp from 'unocss-preset-weapp'
import { defineConfig } from 'unocss'
import { transformerAttributify, transformerClass } from 'unocss-preset-weapp/transformer'
export default defineConfig({
presets: [
// https://github.com/MellowCo/unocss-preset-weapp
presetWeapp({
// h5兼容
// 只开发小程序可删除
platform: 'uniapp',
isH5: process.env.UNI_PLATFORM === 'h5'
})
],
theme: {
colors: {
primary: '#0052cc'
}
},
shortcuts: [
{
'border-base': 'border border-gray-500_10',
'flex-center': 'flex justify-center items-center'
}
],
transformers: [
// https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerAttributify
transformerAttributify(),
// https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerClass
transformerClass()
]
})