title: How to pass the build hash as an environment variable in webpack?
body: <p>I've got an internal application that's built using webpack that gets deployed frequently. In order to make bug reporting easier, I want to include an environment variable of the build hash <code>[hash]</code> that webpack adds to bundle names. This would let me quickly determine if the user is on the latest release.</p>
  
  <p>Using the <code>DefinePlugin</code>, the following does not interpolate the string and instead just stores a literal <code>[hash]</code> string.</p>
  
  <pre><code>new webpack.DefinePlugin({
    'process.env': {
      'HASH': JSON.stringify('[hash]')
    }
  })
  </code></pre>
  
  <p>Is there any way to access the hash directly as a variable or is there a specific way to make it interpolate?</p>