更新 两个配置文件
parent
b2d5938de6
commit
d8513c5525
@ -0,0 +1,27 @@
|
|||||||
|
import presetWeapp from 'unocss-preset-weapp'
|
||||||
|
import { extractorAttributify, transformerClass } from 'unocss-preset-weapp/transformer'
|
||||||
|
|
||||||
|
const { presetWeappAttributify, transformerAttributify } = extractorAttributify()
|
||||||
|
|
||||||
|
export default {
|
||||||
|
presets: [
|
||||||
|
// https://github.com/MellowCo/unocss-preset-weapp
|
||||||
|
presetWeapp(),
|
||||||
|
// attributify autocomplete
|
||||||
|
presetWeappAttributify(),
|
||||||
|
],
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
'border-base': 'border border-gray-500_10',
|
||||||
|
'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(),
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import uni from '@dcloudio/vite-plugin-uni'
|
||||||
|
import Unocss from 'unocss/vite'
|
||||||
|
|
||||||
|
// https://vitejs.dev/config/
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
uni(),
|
||||||
|
// https://github.com/antfu/unocss
|
||||||
|
Unocss(),
|
||||||
|
],
|
||||||
|
})
|
||||||
Loading…
Reference in New Issue