vue自定义标题栏小图标

打开build文件夹
找到webpack.dev.conf.js,再找到HtmlWebpackPlugin,添加favicon:‘favicon.ico路径’,

new HtmlWebpackPlugin({
      filename: 'index.html',
      template: 'index.html',
      favicon:'src/assets/images/favicon.ico',
      inject: true
    }),

然后找到webpack.prod.conf.js,再找到HtmlWebpackPlugin,添加favicon:‘favicon.ico路径’,

new HtmlWebpackPlugin({
      filename: process.env.NODE_ENV === 'testing'
        ? 'index.html'
        : config.build.index,
      template: 'index.html',
      favicon:'src/assets/images/favicon.ico',
      inject: true,
      minify: {
        removeComments: true,
        collapseWhitespace: true,
        removeAttributeQuotes: true
        // more options:
        // https://github.com/kangax/html-minifier#options-quick-reference
      },

你可能感兴趣的:(vue)