postcss.config.js 395 B

12345678910111213
  1. export const postcssConfig = {
  2. viewportWidth: 375, //设计稿的宽度
  3. unitPrecision: 5, // 指定`px`转换为视窗单位值的小数位数(很多时候无法整除)
  4. viewportUnit: "vw", // 指定需要转换成的视窗单位,建议使用vw
  5. };
  6. export default {
  7. plugins: {
  8. "postcss-px-to-viewport-8-plugin": postcssConfig,
  9. tailwindcss: {},
  10. autoprefixer: {},
  11. },
  12. };