mirror of
https://gitee.com/h_mo/uniapp-vue3-vite-ts-template
synced 2025-04-06 03:58:03 +08:00
perf-unocss.config.js 配置,适配小程序
This commit is contained in:
parent
64e858bce1
commit
9d3962e816
@ -4,7 +4,7 @@
|
|||||||
* @link unocss-preset-weapp: https://github.com/MellowCo/unocss-preset-weapp
|
* @link unocss-preset-weapp: https://github.com/MellowCo/unocss-preset-weapp
|
||||||
* */
|
* */
|
||||||
|
|
||||||
import { defineConfig, presetAttributify, presetIcons } from 'unocss';
|
import { defineConfig, presetIcons } from 'unocss';
|
||||||
import presetWeapp from 'unocss-preset-weapp';
|
import presetWeapp from 'unocss-preset-weapp';
|
||||||
import {
|
import {
|
||||||
transformerAttributify,
|
transformerAttributify,
|
||||||
@ -37,6 +37,7 @@ export default defineConfig({
|
|||||||
whRpx: true,
|
whRpx: true,
|
||||||
transform: true,
|
transform: true,
|
||||||
platform: 'uniapp',
|
platform: 'uniapp',
|
||||||
|
transformRules,
|
||||||
}),
|
}),
|
||||||
presetIcons({
|
presetIcons({
|
||||||
scale: 1.2,
|
scale: 1.2,
|
||||||
@ -51,13 +52,11 @@ export default defineConfig({
|
|||||||
],
|
],
|
||||||
theme: {},
|
theme: {},
|
||||||
transformers: [
|
transformers: [
|
||||||
// options 见 https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerAttributify
|
|
||||||
transformerAttributify({
|
transformerAttributify({
|
||||||
classPrefix: prefix,
|
classPrefix: prefix,
|
||||||
transformRules,
|
transformRules,
|
||||||
nonValuedAttribute: true,
|
nonValuedAttribute: true,
|
||||||
}),
|
}),
|
||||||
// options 见 https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerClass
|
|
||||||
transformerClass({
|
transformerClass({
|
||||||
transformRules,
|
transformRules,
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user