-
Notifications
You must be signed in to change notification settings - Fork 0
/
uno.config.js
53 lines (48 loc) · 1.72 KB
/
uno.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
/*
* @Author: 一条死魚 [email protected]
* @Date: 2023-08-15 20:31:58
* @LastEditors: 一条死魚 [email protected]
* @LastEditTime: 2023-08-16 12:37:59
* @FilePath: \component-uniapp-cli\uno.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { defineConfig } from "unocss";
// https://github.com/MellowCo/unocss-preset-weapp
// 小程序预设不需要下载 "@unocss/preset-wind和presetAttributify"不能和unocss-preset-weapp同时使用
// pnpm i -D unocss-preset-weapp && pnpm rm @unocss/preset-wind @unocss/preset-attributify
import presetWeapp from "unocss-preset-weapp";
import {
extractorAttributify,
transformerClass,
} from "unocss-preset-weapp/transformer";
const { presetWeappAttributify, transformerAttributify } =
extractorAttributify();
import presetIcons from "@unocss/preset-icons";
// import presetWind from "@unocss/preset-wind";
// import presetAttributify from "@unocss/preset-attributify";
export default defineConfig({
presets: [
// 这两个是小程序的预设
presetWeapp(),
presetWeappAttributify(),
// 这两个app的预设
// presetWind(),
// presetAttributify(),
// 字体图标预设
presetIcons({
scale: 1.2,
}),
],
// shortcuts: [
// {
// "border-base": "border border-gray-500_10",
// },
// ],
// 小程序的
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(),
],
});