React (CRA) SW Cache "public" folder : <p>After executing the create-react-app and enabling the service workers in the <code>index.js</code>, all relevant files from the <code>src</code> folder are cached. However some of my resources reside in the <code>public</code> directory. When I run <code>npm run build</code>, the <code>asset-manifest.json</code> and <code>precache-manifest.HASH.js</code> only contain the HTML, mangled JS and CSS (all stuff from the <code>src</code> folder).</p>

<p><strong>How can I tell the service worker to additionally cache specific files from the <code>public</code> folder?</strong></p>

<p>Here is the actually generated <code>precache-manifest.e431838417905ad548a58141f8dc754b.js</code></p>

<pre><code>self.__precacheManifest = [
  {
    "revision": "cb0ea38f65ed9eddcc91",
    "url": "/grafiti/static/js/runtime~main.cb0ea38f.js"
  },
  {
    "revision": "2c226d1577937984bf58",
    "url": "/grafiti/static/js/main.2c226d15.chunk.js"
  },
  {
    "revision": "c88c70e5f4ff8bea6fac",
    "url": "/grafiti/static/js/2.c88c70e5.chunk.js"
  },
  {
    "revision": "2c226d1577937984bf58",
    "url": "/grafiti/static/css/main.7a6fc926.chunk.css"
  },
  {
    "revision": "980026e33c706b23b041891757cd51be",
    "url": "/grafiti/index.html"
  }
];
</code></pre>

<p>But I want it to also contain entries for these urls:</p>

<ul>
<li><code>/grafiti/icon-192.png</code></li>
<li><code>/grafiti/icon-512.png</code></li>
</ul>

<p>They come from the <code>public</code> folder.</p>

<p>Alternatively: How can I add my icons for the <code>manifest.webmanifest</code> file in the <code>src</code> folder in a way such that I can reference them from the web manifest?</p>
