px2rem-postcss icon indicating copy to clipboard operation
px2rem-postcss copied to clipboard

postcss-px2rem破坏了sourceMap的源文件名称

Open rouberg opened this issue 7 years ago • 0 comments

vue项目。当开启CSS sourceMap时,没有使用postcss-px2rem时,chrome中查看Hello.vue的样式,样式的源的名称会显示为:Hello.vue? [sm]:18 这样,但是在postcss.config.js里配置postcss-px2rem后,px转换成rem是可以,但是样式的源的名称会显示为这样: <input css 10>:1

postcss.config.js配置如下:

module.exports = {
  plugins: {
    'postcss-px2rem': {
      remUnit: 14
    }
  }
}

不知道这是不是在设计之中。以及,可以优化么。

rouberg avatar Feb 12 '18 08:02 rouberg