Skip to content

Debugging ServiceWorkers #1689

Answered by seansaleh
seansaleh asked this question in Q&A
May 3, 2022 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

To debug your service worker you need to use the flag --sw when running npm run dev

In detail, you need to edit "dev": "preact watch --sw", in your package.json

Then every time you change your service worker you should stop the dev server and rerun it. For good measure you should also create a new Incognito session to view your page.

Thanks to #955 and #1594 for the pointers!

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@seansaleh
Comment options

@rschristian
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by seansaleh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants