首先注释掉webpack.prod.conf.js中下面的代码

new OptimizeCSSPlugin({
 cssProcessorOptions: config.build.productionSourceMap
 ? { safe: true, map: { inline: false } }
 : { safe: true }
}),

然后在utils.js中添加, minimize:true

const cssLoader = {
 loader: 'css-loader',
 options: {
  sourceMap: options.sourceMap,
  minimize:true
 }
 }

然后重新打包传到线上,解决!