@unocss/transformer-compile-class 失效
z-sq opened this issue · 1 comments
z-sq commented
unocss-preset-uni@0.1.5
// uno.config.js
import { defineConfig, presetAttributify, presetIcons } from 'unocss';
import presetRemToPx from '@unocss/preset-rem-to-px';
import transformerCompileClass from '@unocss/transformer-compile-class';
import transformerDirective from '@unocss/transformer-directives';
import transformerVariantGroup from '@unocss/transformer-variant-group';
import { presetUni } from 'unocss-preset-uni';
export default defineConfig({
presets: [
presetUni(),
presetAttributify(),
presetIcons({
cdn: 'https://esm.sh/'
}),
presetRemToPx()
],
transformers: [transformerCompileClass(), transformerDirective(), transformerVariantGroup()]
});
<!-- index.vue -->
<template>
<view class=":uno: text-red">Hello</view>
</template>
配合transformerCompileClass 失效, 审查元素发现class已经合并,但是无对应样式
z-sq commented
原因是@unocss/transformer-compile-class 不支持热重载