This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
How to distribute service worker? How will the API be? #7
Labels
need/community-input
Needs input from the wider community
It's difficult to import script in service worker. There is no
window
orglobal
in SW, and we can't get an object thatexports
by an npm package.I think https://cdn.jsdelivr.net/npm/ipfs/dist/index.js is a good example to follow, it injects a
Ipfs
object to the context.Then how will the API be? Are we going to export a function likes
getFile
and let user write this boilerplate code?The text was updated successfully, but these errors were encountered: