How to inject Webpack build hash to application code : <p>I'm using Webpack's [hash] for cache busting locale files. But I also need to hard-code the locale file path to load it from browser. Since the file path is altered with [hash], I need to inject this value to get right path.</p>

<p>I don't know how can get Webpack [hash] value programmatically in config so I can inject it using WebpackDefinePlugin.</p>

<pre><code>module.exports = (env) =&gt; {
  return {
   entry: 'app/main.js',
   output: {
      filename: '[name].[hash].js'
   }
   ...
   plugins: [
      new webpack.DefinePlugin({
         HASH: ***???***
      })
   ]
  }
}
</code></pre>
