关于vue.js:vuecli-设置html的title

0次阅读

共计 174 个字符,预计需要花费 1 分钟才能阅读完成。

vue.config.js

 chainWebpack: (config) => {config.plugin('html').tap((args) => {args[0].title = '你想设置的 title 名字'
      return args
    })
  }

index.html

  <title>
    <%= htmlWebpackPlugin.options.title %>
  </title>
正文完
 0