can not work in vite2.0?
ZedCoding opened this issue · 1 comments
ZedCoding commented
lkxian888 commented
vite请在vite.config.ts 添加如下代码
import postcsspxtoviewport8plugin from 'postcss-px-to-viewport-8-plugin';
export default defineConfig({
css: {
postcss: {
plugins: [
postcsspxtoviewport8plugin({
unitToConvert: 'px',
viewportWidth: 1920;
unitPrecision: 5,
propList: ['*'],
viewportUnit: 'vw',
fontViewportUnit: 'vw',
selectorBlackList: [],
minPixelValue: 1,
mediaQuery: true,
replace: true,
exclude: [],
include: undefined,
landscape: false,
landscapeUnit: 'vw'
}),
],
},
},
})