Loading

Replace Autoprefixer browsers option to Browserslist config. Use browserslist key in package.json

Replace Autoprefixer browsers option to Browserslist config.
  Use browserslist key in package.json or .browserslistrc file.

  Using browsers option can cause errors. Browserslist config
  can be used for Babel, Autoprefixer, postcss-normalize and other tools.

  If you really need to use option, rename it to overrideBrowserslist.

  Learn more at:
  https://github.com/browserslist/browserslist#readme
  https://twitter.com/browserslist

一、报错原因 

postcss.config.js 文件中,引用的版本过高导致的。

二、解决办法

修改postcss.config.js文件:

module.exports = {
  plugins: {
    'autoprefixer': {
      overrideBrowserslist: [
        "Android 4.1",
        "iOS 7.1",
        "Chrome > 31",
        "ff > 31",
        "ie >= 8"
      ]
    },
    'postcss-pxtorem': {
      rootValue: 37.5,
      propList: ['*']
    }
  }
}

posted @ 2022-04-07 19:29  Roc-xb  阅读(81)  评论(0)    收藏  举报

易微帮源码


易微帮官网