vue3+vite 使用postcss-pxtorem

2022-03-28  本文已影响0人  PharkiLL
npm i  postcss-pxtorem -D
module.exports = {
    plugins: {
        autoprefixer: {
            overrideBrowserslist: [
                "Android 4.1",
                "iOS 7.1",
                "Chrome > 31",
                "ff > 31",
                "ie >= 8",
                "last 10 versions", // 所有主流浏览器最近10版本用
            ],
            grid: true,
        },
        'postcss-pxtorem': {
            rootValue: 37.5,
            propList: ['*'],
            unitPrecision: 5
        }
    }
}
 
npm i amfe-flexible -D
import 'amfe-flexible/index.js'
npm i autoprefixer
上一篇 下一篇

猜你喜欢

热点阅读