Html-webpack-plugin: Favicon with hash

Created on 29 Jun 2016  路  5Comments  路  Source: jantimon/html-webpack-plugin

https://github.com/ampedandwired/html-webpack-plugin/blob/master/index.js#L410

Says that with option hash: true, It would add a hash to favicons. After several tests, I realized that javascript and css files contains a hash, but favicons don't. Maybe is this a bug?

My config:

new HtmlWebpackPlugin({
    filename: 'index.html',
    template: 'index.html',
    favicon: 'favicon.ico',
    hash: true
})

Most helpful comment

Is there any update on this?

All 5 comments

Hm don't know why but you could use the https://github.com/jantimon/favicons-webpack-plugin - it will generate a hashed filename if needed.

Why was this issue closed? The error still persists.

Is there any update on this?

I think it's important to note that even if the hash did work for favicon, it is a compilation hash and not a content hash. The hash is also appended via query string as opposed to appending to the file name. Neither of these qualities are ideal for caching so I suggest users either create a PR fix or find an alterntative solution (that's what I'm doing). This library has been great for generating the html and I'm going to leave its purpose at that.

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

lonelydatum picture lonelydatum  路  3Comments

MatthewKosloski picture MatthewKosloski  路  3Comments

hackteck picture hackteck  路  3Comments

GerkinDev picture GerkinDev  路  3Comments

Rowno picture Rowno  路  3Comments