天波h5前端应用
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.

32 line
872B

  1. /*
  2. * @Date: 2022-01-19 10:10:50
  3. * @LastEditors: JinxChen
  4. * @LastEditTime: 2022-01-21 15:57:33
  5. * @FilePath: \alipay-scan-code-front-end\.postcssrc.js
  6. * @description:
  7. */
  8. const path = require("path");
  9. module.exports = ({ webpack }) => {
  10. const designWidth = webpack.resourcePath.includes(path.join("node_modules", "vant")) ? 375 : 375;
  11. return {
  12. plugins: {
  13. autoprefixer: {},
  14. "postcss-px-to-viewport": {
  15. unitToConvert: "px",
  16. viewportWidth: designWidth,
  17. unitPrecision: 6,
  18. propList: ["*"],
  19. viewportUnit: "vw",
  20. fontViewportUnit: "vw",
  21. selectorBlackList: [],
  22. minPixelValue: 1,
  23. mediaQuery: true,
  24. exclude: [],
  25. landscape: false,
  26. landscapeUnit: 'vw', // 横屏时使用的单位
  27. landscapeWidth: 1125 // 横屏时使用的视口宽度
  28. }
  29. }
  30. };
  31. };