|
- /*
- * @Date: 2022-01-19 10:10:50
- * @LastEditors: JinxChen
- * @LastEditTime: 2022-01-21 15:57:33
- * @FilePath: \alipay-scan-code-front-end\.postcssrc.js
- * @description:
- */
- const path = require("path");
-
- module.exports = ({ webpack }) => {
- const designWidth = webpack.resourcePath.includes(path.join("node_modules", "vant")) ? 375 : 375;
- return {
- plugins: {
- autoprefixer: {},
- "postcss-px-to-viewport": {
- unitToConvert: "px",
- viewportWidth: designWidth,
- unitPrecision: 6,
- propList: ["*"],
- viewportUnit: "vw",
- fontViewportUnit: "vw",
- selectorBlackList: [],
- minPixelValue: 1,
- mediaQuery: true,
- exclude: [],
- landscape: false,
- landscapeUnit: 'vw', // 横屏时使用的单位
- landscapeWidth: 1125 // 横屏时使用的视口宽度
- }
- }
- };
- };
|