title: insert dynamic value into output file
body: <h2 id="context-cr06">Context</h2>
  <p>I have a service worker entrypoint which looks like this:</p>
  <pre class="lang-js prettyprint-override"><code>{
    entry: {
      serviceWorker: './src/serviceWorker.ts'
    }
  }
  </code></pre>
  <p>There are other entrypoints, but for this example I'm just showing the service worker entrypoint.</p>
  <p>I want the contents of the service worker to change whenever any output file changes so that the browser will detect a service worker change (and can update to use the new version). I can use <code>stats.hash</code> for this.</p>
  <h2 id="what-im-trying-to-do-l39g">What I'm trying to do</h2>
  <p>When building the project with webpack, this like should be inserted into some place in the output file:</p>
  <pre class="lang-js prettyprint-override"><code>/* hash: asdf70a89sd7f098as7d0f897a0 */
  </code></pre>
  <p>the hash will be whatever <code>hash</code> is in the webpack stats.</p>