Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

3box within Workers #754

Closed
0nlyP2P opened this issue Apr 3, 2020 · 2 comments
Closed

3box within Workers #754

0nlyP2P opened this issue Apr 3, 2020 · 2 comments

Comments

@0nlyP2P
Copy link
Contributor

0nlyP2P commented Apr 3, 2020

At the moment I am migrating Totem to WebWorkers for better performance. 3box works fine, but it needs a small adjustment.

In the dependency ipfs-mini is on call to the window object, which is not available in workers.

I opened a issue (SilentCicero/ipfs-mini#14) there and submitted a working pull request (SilentCicero/ipfs-mini#15).

All you need to do is upgrading the dependency, when the request gets merged.

If someone has the same problem a not ideal but functioning workaround is to edit the line I changed in the pull request in your node_modules/ipfs-mini directory, it works, but it breaks again when you reinstall dependencies, so do not use in production.

@oed
Copy link
Member

oed commented Apr 3, 2020

Hey, thanks for bringing this up! 'ipfs-mini' is not actually used in 3box anymore and should be removed!
It's imported here but never used:

const IpfsMini = require('ipfs-mini')

We will remove it eventually, but if you want you can make a PR!

@oed oed self-assigned this Apr 3, 2020
@oed
Copy link
Member

oed commented Apr 6, 2020

Solved by #755
This will be part of the next 3box release

@oed oed closed this as completed Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants