I use HtmlWebpackPlugin to generate my index.html through template. In there I write
var compilationHash = <%= webpack.hash %>
But this is of course in the html file. Similarly, I want to access the same hash in the bundle file. But obviously webpack is not available there. Is there a way to somehow provide webpack.hash into the file so I can access it just like the way I do var something = process.env.SOMETHING?
I hoped ProvidePlugin could be handy here, but not sure how I can access compilation hash in there.