lkxian888/postcss-px-to-viewport-8-plugin

【功能建议】viewportWidth 函数如果返回 undefined 就跳过转换

Closed this issue · 2 comments

viewportWidth: (file) => {
  if (file.includes('/mobile/')) {
    return 720
  } else if (file.includes('/pc/')) {
    return 1920
  } else {
    return undefined // 表示 不进行转换
  }
}, // UI设计稿的宽度

我希望,不是这2个目录的css,就都不进行转换,有点类似 exclude, 但比 exclude更灵活

谢谢

viewportWidth: (file) => {
  if (file.includes('/mobile/')) {
    return 720
  } else if (file.includes('/pc/')) {
    return 1920
  } else {
    return undefined // 表示 不进行转换
  }
}, // UI设计稿的宽度

我希望,不是这2个目录的css,就都不进行转换,有点类似 exclude, 但比 exclude更灵活

谢谢

功能已经实现!

大佬牛逼 ,感谢