html-webpack-plugin icon indicating copy to clipboard operation
html-webpack-plugin copied to clipboard

Access the webpack bundle hash

Open andrewsamuelsen opened this issue 10 years ago • 6 comments

How do I access the webpack bundle hash?

andrewsamuelsen avatar Jul 07 '16 21:07 andrewsamuelsen

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

jantimon avatar Jul 07 '16 21:07 jantimon

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

tomsun avatar Dec 20 '16 22:12 tomsun

@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 avatar Sep 27 '17 18:09 glusa8

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

patricksmms avatar Nov 09 '17 13:11 patricksmms

@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?

Jade66 avatar Dec 13 '17 16:12 Jade66

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.

lock[bot] avatar May 31 '18 11:05 lock[bot]