// postcss.config.js
import pxToViewport from 'postcss-px-to-viewport-8-plugin'

export default {
  plugins: [
    pxToViewport({
      unitToConvert: 'px',
      viewportWidth: 375, // ✅ 这里建议改成 375，更贴近主流 H5 设计稿
      unitPrecision: 6,
      propList: ['*'],
      viewportUnit: 'vw',
      fontViewportUnit: 'vw',
      selectorBlackList: ['ignore', /^van-/], // ✅ 用正则更稳妥
      minPixelValue: 1,
      mediaQuery: false,
      replace: true,
      exclude: [/node_modules/],
      landscape: false,
    }),
  ],
}
