Replace Autoprefixer browsers op

2020-08-21  本文已影响0人  SailingBytes

require('autoprefixer')({

    browsers:['last 2 version','>1%','ios 7']

});

打包或者运行时,出现一下错误

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

解决方法:

require('autoprefixer')({

    overrideBrowserslist:['last 2 version','>1%','ios 7']

})

上一篇 下一篇

猜你喜欢

热点阅读