在webpack.prod.conf.js文件中,找到
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }}),替换成
new OptimizeCSSPlugin({
cssProcessorOptions: {
safe: true, map: {inline: false},
autoprefixer: {remove: false} //添加对autoprefixer的配置
}
}),