Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectorBlackList 无效 #30

Open
yangyiming opened this issue Jan 23, 2021 · 1 comment
Open

selectorBlackList 无效 #30

yangyiming opened this issue Jan 23, 2021 · 1 comment

Comments

@yangyiming
Copy link

const pxtorem = require('postcss-px2rem')
const postcssPresetEnv = require('postcss-preset-env')
module.exports = ({ file }) => {
  let remUnit = null
  if (file && file.dirname && file.dirname.indexOf('vant') > -1) {
    remUnit = 37.5
  } else {
    remUnit = 75
  }
  return {
    plugins: [
      pxtorem({
        remUnit: remUnit,
        propList: ['*'],
        selectorBlackList: ['']
      }),
      postcssPresetEnv({
        stage: 3,
        features: {
          'nesting-rules': true,
          'color-mod-function': { unresolved: 'warn' }
        }
      })
    ]
  }
}

selectorBlackList 不管我设置如何匹配都是不生效的,而且查询了源代码根本没有selectorBlackList 这个配置选项

@liuliangsir
Copy link

@yangyiming 这个插件本身就不支持吧,应该去这里寻求帮助吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants