I’m using create react app and recently added a service worker so as to make it a PWA. It was very easy and seemed to work great. However, now whenever I build a new version of my app I get the following error on the initial load of the website:
I believe the problem is that when I build my app the file names are randomly generated and don’t match the old ones. The PWA is using the old index.html trying to fetch the old files which don’t exist anymore.
What is the best way of fixing this?