在 vue.config.js 中添加配置:
// 修改或新增html-webpack-plugin的值,在index.html里面能读取htmlWebpackPlugin.options.title
chainWebpack: config =>{
config.plugin('html').tap(args => {
args[0].title = '你想要设置的title';
return args;
})
},