Html-webpack-plugin: Access the webpack bundle hash

Created on 7 Jul 2016  路  6Comments  路  Source: jantimon/html-webpack-plugin

How do I access the webpack bundle hash?

Most helpful comment

from a custom template: <%= webpack.hash %>

All 6 comments

See the stats option at the bottom of the https://github.com/ampedandwired/html-webpack-plugin#writing-your-own-templates section

from a custom template: <%= webpack.hash %>

@tomsun do you have the documentation for webpack.hash being used inside a template?

I couldn't find it anywhere that said, you can use webpack.hash in terms of official documentation.

@glusa8, if it's not working for you, try changing the file extension from .html to something else, like .ejs

@glusa8 , I am also leery of using webpack.hash if it's not officially supported. But it is exactly what I need. Any word on the "official" status of this property?

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