在buildwebpack.prod.conf.js找到如下配置,找到removeAttributeQuotes: true,将true改为false,重新打包即可
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: false //将此处的true改为false
},
chunksSortMode: 'dependency'
}),