Vue中postcss-pxtorem的配置文件

module.exports = {
  plugins: {
    // 'autoprefixer': {
    //   browsers: ['Android >= 4.0', 'iOS >= 8']
    // },
    'postcss-pxtorem': {
      rootValue({file}) {
        // 判断是否为Vant文件,从而匹配不同的rootValue值
       return file.indexOf('vant') !== -1? 37.5:75
      },
      propList: ['*']
    }
  }
}
posted @ 2021-09-06 20:45  麦田与星空  阅读(768)  评论(0)    收藏  举报