postcss.config.js 444 B

123456789101112
  1. // postcss.config.js
  2. // 用 vite 创建项目,配置 postcss 需要使用 post.config.js,之前使用的 .postcssrc.js 已经被抛弃
  3. // 具体配置可以去 postcss-pxtorem 仓库看看文档
  4. module.exports = {
  5. "plugins": {
  6. "postcss-pxtorem": {
  7. rootValue: 37.5, // Vant 官方根字体大小是 37.5
  8. propList: ['*'],
  9. selectorBlackList: ['.norem'] // 过滤掉.norem-开头的class,不进行rem转换
  10. }
  11. }
  12. }