打包前:
image.png
打包后:
image.png
解决方法:修改webpack.prod.conf.js文件
修改前:
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
new OptimizeCSSPlugin({
safe: true, map: {inline: false},
autoprefixer: {remove: false},
}),
修改后
new OptimizeCSSPlugin({
safe: true, map: {inline: false},
autoprefixer: {remove: false},
cssProcessorOptions: {
safe: true
}
}),









网友评论