postcss.config.js 1019 B

123456789101112131415161718
  1. module.exports = {
  2. plugins: {
  3. 'autoprefixer': {},
  4. "postcss-px-to-viewport": {
  5. viewportWidth: 750, // (Number) The width of the viewport.
  6. viewportHeight: 1334, // (Number) The height of the viewport.
  7. unitPrecision: 3, // (Number) The decimal numbers to allow the REM units to grow to.
  8. viewportUnit: 'vw', // (String) Expected units.
  9. selectorBlackList: ['.ignore', '.hairlines', 'wrap'], // (Array) The selectors to ignore and leave as px.
  10. minPixelValue: 1, // (Number) Set the minimum pixel value to replace.
  11. mediaQuery: false, // (Boolean) Allow px to be converted in media queries.
  12. exclude: [/node_modules/], // 设置忽略文件,用正则做目录名匹配
  13. landscape: false, // 是否处理横屏情况
  14. propList: ["*"], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换
  15. },
  16. }
  17. }