mpx icon indicating copy to clipboard operation
mpx copied to clipboard

feat: unocss 支持 postcss

Open XiaoXice opened this issue 11 months ago • 3 comments

fix: https://github.com/didi/mpx/issues/1850

XiaoXice avatar Feb 17 '25 08:02 XiaoXice

用unocss preset貌似可以解决你的问题 参考 https://github.com/unocss/unocss/blob/main/packages-presets/preset-rem-to-px/src/index.ts

pagnkelly avatar Feb 17 '25 09:02 pagnkelly

这个功能确实是可以通过 unocss preset 实现,但是 postcss 还可以添加其他的插件,例如 autoprefixer unocss 配合 vite 框架是可以正常使用postcss处理uno生成的css的。 我的实现方式可能不太优雅,希望mpx可以支持这个功能。

XiaoXice avatar Feb 18 '25 08:02 XiaoXice

完善一下输出小程序时unocss产物也经过postcss处理的逻辑吧,目前提交的部分只有针对输出web时的处理不符合跨平台一致的预期

hiyuki avatar Mar 13 '25 03:03 hiyuki