Html-webpack-plugin: Favicons should be added with a hash

Created on 30 Nov 2015  路  5Comments  路  Source: jantimon/html-webpack-plugin

Currently the generated markup is as follows:

<link rel="shortcut icon" href="/favicon.ico">

Suggested markup is:

<link rel="icon" type="image/x-icon" href="/favicon.ico?xxx">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?xxx">
<link rel="shortcut" type="image/x-icon" href="/favicon.ico?xxx">
enhancement help wanted

Most helpful comment

Being able to load it as favicon.[hash].png would also be helpful for me. Maybe something similar to how you can configure output filenames?

Eg.

      new HtmlWebpackPlugin({
        favicon: {
          source: 'images/icon.png',
          outputFilename: 'icon.[hash].png'
        },
      }),

All 5 comments

Being able to load it as favicon.[hash].png would also be helpful for me. Maybe something similar to how you can configure output filenames?

Eg.

      new HtmlWebpackPlugin({
        favicon: {
          source: 'images/icon.png',
          outputFilename: 'icon.[hash].png'
        },
      }),

It would be great if the the the output favicon name could differ from the original name of the file. Eg I have multiple entry points like:

[
new HtmlWebpackPlugin({
      title: 'Home',
      minify: htmlMinifyOptions,
      chunks: ['home', 'vendor'],
      template: './app/index.html',
      filename: 'index.html',
      favicon: './app/pages/home/favicon.ico',
    }),
    new HtmlWebpackPlugin({
      title: 'Contact',
      minify: htmlMinifyOptions,
      chunks: ['contact', 'vendor'],
      template: './app/index.html',
      filename: 'contact.html',
      favicon: './app/pages/contact/favicon.ico',
    }),
]

I would like to have different favicons for the home page and the contact page but I would like to have the original favicon files to be named favicon (./app/pages/home/favicon.ico and ./app/pages/contact/favicon.ico). Currently this is not working because their both output names will just be favicon.ico and they will conflict. Having the file's hash in the output name would solve this.

Please use the https://github.com/jantimon/favicons-webpack-plugin for advanced favicon options.

No "theme_color" in output manifest.json. I don't see any info on configuring options other than ver simple example. output manifest.json is invalid due to this.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hp8wvvvgnj6asjm7 picture hp8wvvvgnj6asjm7  路  3Comments

azat-io picture azat-io  路  4Comments

meleyal picture meleyal  路  3Comments

lcxfs1991 picture lcxfs1991  路  4Comments

mmjamal picture mmjamal  路  3Comments