-
-
Notifications
You must be signed in to change notification settings - Fork 432
Conversation
This PR will fail in CI until #521 is merged. |
Re-ran Travis build (the failing test looks like probably just some flakiness). I don't see how to and/or I don't have the permissions to re-run the Appveyor build. |
c2fd7da
to
b9c2457
Compare
Rebased |
Side note: I am now running this in Pinafore unstable, at https://dev.pinafore.social. Been testing manually and so far everything seems to be working as before. 🙂 To be fair, though, Pinafore does not do anything fancy like preloading or server routes. |
Hmm, the |
I cannot reproduce the |
Take a look at #531 - if you haven't rebased on master since that was merged, give that a go. |
b9c2457
to
03af9b1
Compare
Rebased! |
Tests are green. :) |
released 0.24.3, finally. thank you! |
As far as I can tell, `/index.html` should no longer exist (outside of `sapper export`, which doesn't apply here). After sveltejs#525 was merged, we're now using `/service-worker-index.html`, but that's handled by `get_page_handler.ts`, not here. So this code is doing nothing.
This fixes #422 by outputting a new
/service-worker-index.html
file which can be cached by the service worker and served in offline use cases.The reason I went with
service-worker-index.html
rather than the oldindex.html
is that the latter breakssapper export
, since the service worker-targetedindex.html
conflicts with the base route. Sinceindex.html
is kind of an imprecise name for it anyway, I figured renaming toservice-worker-index.html
made the most sense.The only change that users will have to make in order to get this to work is to use the commented code from
sapper-template
defined here. We'll probably want to update that commented code anyway, since it hasn't worked for about a year.I have tested this with
sapper-template
and it works.To test, you just
npm link
this PR tosapper-template
, then insapper-template
, donpm run build && npm start
and then navigate to the base URL, then put the Dev Tools in offline mode, uncomment the commented-out service worker code, then refresh. At this point, the new page should be served by the service worker usingservice-worker-index.html
.