VW适配方案后造成伪类使用content报错的解决办法 already has a 'content' property, give up to overwrite it.

配置.postcssrc.js的postcss-viewport-units:

'postcss-viewport-units': {
  filterRule: rule => rule.selector.includes('::after') && rule.selector.includes('::before') && rule.selector.includes(':after') && rule.selector.includes(':before')
}

or

'postcss-viewport-units': {
  filterRule: rule => rule.nodes.findIndex(i => i.prop === "content") === -1
}

亲测可用,可以一试,。

你可能感兴趣的:(VW适配方案后造成伪类使用content报错的解决办法 already has a 'content' property, give up to overwrite it.)