数据报表
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
857 B

3 years ago
3 years ago
3 years ago
  1. const path = require('path');
  2. module.exports = ({
  3. file
  4. }) => {
  5. const designWidth = file.dirname.includes(path.join('node_modules', 'vant')) ? 375 : 750;
  6. return {
  7. plugins: {
  8. autoprefixer: {},
  9. "postcss-px-to-viewport": {
  10. unitToConvert: "px",
  11. viewportWidth: designWidth,
  12. propList: ["*"],
  13. unitPrecision: 3, // 转换后的精度,即小数点位数
  14. viewportUnit: "vw",
  15. fontViewportUnit: "vw",
  16. selectorBlackList: [],
  17. landscapeUnit: 'vh', // 横屏时使用的单位
  18. landscapeWidth: 667, // 横屏时使用的视口宽度
  19. selectorBlackList: [], // 指定不转换为视窗单位的类名
  20. minPixelValue: 1, // 默认值1,小于或等于1px则不进行转换
  21. mediaQuery: true,
  22. exclude: [],
  23. landscape: false
  24. }
  25. }
  26. }
  27. }