VSCode Service Worker is overriding my Service Worker #312
Unanswered
cemalgnlts
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Did you only try on localhost or on the deployed version of you app? it seems there is a condition for localhost and that's the only place a fetch is done directly Otherwise, it seems that the worker delegate the request back to the main page (but I may be wrong as I'm not a SW expert :) ) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I use a service worker, so I can present all the files offline.
(https://github.com/cemalgnlts/jside/blob/main/public/sw.js#L49)
But after the last update, probably because of the Welcome View service, it now registers a service worker in VSCode. Since VSCode's service worker does the fetch of the two files itself, I cannot serve them from cahce.
With the Developer Console, I printed the files accessed by both my Service Worker and the VSCode Service Worker to the console. As you can see in the picture, my service worker serves everything except an html file. Since I cannot serve this html file, it is not possible for the project to run completely offline.
https://github.com/microsoft/vscode/blob/a9561b8195c3f99ec7e8e72bc2307dcefced0d56/src/vs/workbench/contrib/webview/browser/pre/service-worker.js#L159
Beta Was this translation helpful? Give feedback.
All reactions