Load feathers client in service worker #2639
Unanswered
ericuldall
asked this question in
Q&A
Replies: 1 comment 5 replies
-
The Feathers client does not need a DOM and can be loaded already into a service worker (although not as an ES module - the related issue for that is #2423 and there is a branch for v5 at https://github.com/feathersjs/feathers/tree/esm-build but it has build issues for some reason). |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello we currently use feathers client in a chrome manifest v2 extension which uses background pages. This works great because they work like the dom, every file included is available in shared scope. Unfortunately v2 is sunsetting this year and we're forced to migrate to manifest v3 which uses service workers. These do not have access to window or any other shared dom type scopes.
So as I plan to migrate our extension I'm stuck with the question of how does the feathers client fit in. Fortunately the service worker does have a mode where it can run as an ES Module. So to me the easiest solution is to see if feathers can now or will soon be available with an ESM build. Is this currently possible?
Or if there's any other solutions to get this working in a service worker i'm all ears. Just getting my head around the change and looking for some guidance.
https://developer.chrome.com/docs/extensions/mv3/service_workers/
https://web.dev/es-modules-in-sw/
tl;dr
Can feathers client be used as an ESM?
Beta Was this translation helpful? Give feedback.
All reactions