sveltejs/sapper

Service worker throws TypeError: Request failed in production only

Closed this issue · 1 comments

It works fine with local sapper dev and sapper prod build, but when deployed to Github Pages, the service worker throws an error on install step.

The solution as described here is to prefix all files that go into cache.addAll with a dot, but when I do that I run into even more errors and the site breaks in prod.

I am pretty sure this error didn't happen before Sapper 0.28, might be related to #1244

Additionally, the promises in the service worker file are missing catch blocks.

I switched to Netlify for deployment in the meantime and it works perfectly, so I will close this ticket, but I am pretty sure that others might run into these issues.