This repository was archived by the owner on Apr 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Instructions to demonstrate this? #9
Copy link
Copy link
Open
Description
Are there a set of instructions to get this working ?
What I figured so far ...
- Clone the repo from here
- cd to ipfs-service-worker
- npm install
- cd examples
- npm run build
- cp -r public+sw/* dist/public+sw
Then copy all of dist/public+sw to a http server
Access for example /public+sw/index.html
It reports ...
-> Registered the service worker successfuly
bundle.js:1:807398
install step
service-worker-bundle.js:1:1582000
activate step
so it looks like the SW is activated.
But ...clicking on window.ipfs.id gets:
TypeError: asm.js type error: expecting argument type declaration for 'e' of the form 'arg = arg|0' or 'arg = +arg' or 'arg = fround(arg)'
TypeError: e(...) is undefined
and putting a IPFS hash in the input box results in e.g.
Handling fetch event for http://localhost:8080/ipfs/zb2rhfUz7JSdBBb39AHrhtiMLFa5XV2h8Ni1mGz8D67NNKsZg
So it looks like service worker is getting the request, but it never returns.
I'm not sure if I'm doing something wrong (e.g. I didn't change config from the repo default) or if its still early days for this?
Metadata
Metadata
Assignees
Labels
No labels