美文网首页
Replace Autoprefixer browsers op

Replace Autoprefixer browsers op

作者: SailingBytes | 来源:发表于2020-08-21 11:15 被阅读0次

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']

})

相关文章

网友评论

      本文标题:Replace Autoprefixer browsers op

      本文链接:https://www.haomeiwen.com/subject/qjkujktx.html