title: Network first caching of index.html using workbox.js
body: <p>I've integrated a service worker into our Single Page App built with ReactJS, using the workbox-build package by Google. </p>
  
  <p>I'm having some troubles on the pre-caching of the index.html, specifically the service worker is serving an outdated index.html everytime we release a new build. Since it served an outdated index.html, the main JavaScript file is not found since it is versioned based on the build.</p>
  
  <pre><code>&lt;/div&gt;&lt;script type="text/javascript" src="/static/js/main.fa34a3ce.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I have also tried to remove the index.html from pre-cache, and have it in the runtime cache with a network first setting. But it doesn't seem to be cached by the service worker.</p>
  
  <pre><code>runtimeCaching: [
    {
      urlPattern: /\/$/,
      handler: 'networkFirst',
      options: {
        cacheName: 'my-cache-index'
      }
    }
  ]
  </code></pre>