vue中添加标签页title中的小图标

小图标素材地址:https://www.iconfont.cn/

添加的方法:

//webpack.prod.conf.js中添加如下代码

const path = require('path') ;
       .....
new HtmlWebpackPlugin({
    filename: config.build.index,
    template: 'index.html',
    favicon: path.resolve('./favicon.ico'),
    inject: true,
}),
//在webpack.prod.dev.js中添加如下代码:
const path = require('path');
      .....
new HtmlWebpackPlugin({
    filename: 'index.html',
    template: 'index.html',
    favicon: path.resolve('./favicon.ico'),
    inject: true,
}),
//在index.html中的title下面添加下面代码

 

你可能感兴趣的:(Vue+iView爬坑系列)