ppms-uni-vue3-huertian/uno.config.ts
HoshinoSuzumi b62fe580af feat: 添加 tabler 图标库和 unocss preset-icons
为项目添加了 "@iconify-json/tabler" 和 "@unocss/preset-icons" 依赖,用于引入 tabler 图标库和 unocss preset-icons 预设样式。
2024-09-21 11:38:32 +08:00

45 lines
1.1 KiB
TypeScript

import presetIcons from "@unocss/preset-icons";
import presetWeapp from "unocss-preset-weapp";
import {
extractorAttributify,
transformerClass,
} from "unocss-preset-weapp/transformer";
import transformerDirectives from "@unocss/transformer-directives";
const { presetWeappAttributify, transformerAttributify } =
extractorAttributify();
export default {
presets: [
// https://github.com/MellowCo/unocss-preset-weapp
presetWeapp({
whRpx: false,
}),
// attributify autocomplete
presetWeappAttributify(),
// https://unocss.dev/presets/icons
presetIcons(),
],
shortcuts: [
{
"border-base": "border border-gray-500_10",
center: "flex justify-center items-center",
},
],
transformers: [
transformerDirectives({
enforce: "pre",
}),
// 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(),
],
};