module.exports = {
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].title = '你的标题'
return args
})
},
css: {
loaderOptions: {
sass: {
// 全局引入变量和 mixin
prependData: `
@import "@/assets/scss/variable.scss";
@import "@/assets/scss/mixin.scss";
`
}
}
},
devServer: {
proxy: {
[process.env.VUE_APP_BASE_API]: {
target: `http://172.16.90.64:7200/company/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
}
},
disableHostCheck: true
},
productionSourceMap: false,
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/'
}
转载请注明:有爱前端 » htmlWebpackPlugin.options.title 如何配置