webpack4配置postcss报错
QQ20200811-183855@2x.png
webpack.config.js
{
loader: 'postcss-loader',
options: {
plugins: () => {
require('autoprefixer')({
browsers: ['last 2 version', '>1%', 'ios 7']
});
}
}
}
修改
plugins: () => [
require('autoprefixer')({
overrideBrowserslist: ['last 2 version', '>1%', 'ios 7']
})
]
需要用overrideBrowserslist,而且plugin需要的是[]
网友评论