Await the service worker
At the moment we are setting up the service worker and in the meantime already await the imports. The problem with this is that the service worker will have to download everything as well, so on a completely clean set up, you are downloading everything twice at the moment.
I'm not sure how we can actually do this. The promise returned by navigator.serviceWorker.register seems to resolve before all the actual file caching happens.
I believe part of the problem here could be that locally we request a different URL than the service worker does (the service worker includes some hash in the URL), so the normal browser cache considers it a cache miss and does another request. I'm pretty sure we can easily change the configuration of our service worker to not do that, if that is indeed the problem.