今天在配置gulp autoprefixer 控制台 出现了警告问题,
Replace Autoprefixer browsers option to Browserslist config.
Use browserslist key in package.json or .browserslistrc file.
Using browsers option cause some error. 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
原来代码
{
loader: 'postcss-loader',
options: {
ident:'postcss',
sourceMap:true,
plugins:(loader)=> [
require("autoprefixer")({
browsers: [ // 设置浏览器版本
'last 10 Chrome versions',
'last 5 Firefox versions',
'Safari >= 6',
'ie> 8'
]
})/*在这里添加*/
]
}
修改后
{
loader: 'postcss-loader',
options: {
ident:'postcss',
sourceMap:true,
plugins:(loader)=> [
require("autoprefixer")({
overrideBrowserslist: [ // 设置浏览器版本
'last 10 Chrome versions',
'last 5 Firefox versions',
'Safari >= 6',
'ie> 8'
]
})/*在这里添加*/
]
}
}