1、下载包
pnpm add lib-flexible-computer postcss-px2rem px2rem-loader -D
2、在main.ts里引入
import "lib-flexible-computer";
3、在vite.config.ts写入
import px2rem from "postcss-px2rem"
css: {
postcss: {
plugins: [
px2rem({
remUnit:192
})
]
}
原文链接:https://blog.csdn.net/m0_49256439/article/details/129397019
标签:lib,px2rem,PC,computer,vue3,postcss,vite From: https://www.cnblogs.com/lzhflzjx/p/17353480.html