umi项目如何使用 pxToViewPort
2、安装依赖
"postcss-px-to-viewport": "^1.1.1"
1、.umirc.ts
import pxToViewPort from 'postcss-px-to-viewport';
3、
extraPostCSSPlugins: [
pxToViewPort({
viewportWidth: 750,
viewportHeight: 1334,
unitPrecision: 3,
viewportUnit: 'vw',
selectorBlackList: ['node_modules', '.hairlines', '.am-'],
minPixelValue: 1,
mediaQuery: false,
}),
],
漫思