title: PWA support in NextJs
body: <p>we would like to build a fully offline capable react web application. We usually work with NextJS.</p>
  <p>The current problem that we are facing is that we are not able to precache all routes of the application, even though they are not making use of SSR.</p>
  <p>For example:</p>
  <pre><code>pages
   - index.js
   - projects
     - index.js
     - [id.js]
  </code></pre>
  <p>The service worker should precache all pages (HTML) upfront, so that the application is immediately fully offline capable:</p>
  <ul>
  <li>/</li>
  <li>/projects</li>
  <li>/projects/123</li>
  <li>/projects/???</li>
  </ul>
  <p>We tried to use <a href="https://github.com/hanford/next-offline" rel="noreferrer">next-offline</a> and <a href="https://github.com/shadowwalker/next-pwa" rel="noreferrer">next-pwa</a>, but we were only able to precache the static assets.</p>
  <p>Has anybody had a similar requirement and found a solution?</p>