Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Require ipfs.min.js #976

Closed
lightninglu10 opened this issue Sep 1, 2017 · 4 comments
Closed

Require ipfs.min.js #976

lightninglu10 opened this issue Sep 1, 2017 · 4 comments
Labels
kind/support A question or request for support

Comments

@lightninglu10
Copy link

Hey guys, is there any way to require ipfs.min.js in javascript code?

I want to use IPFS in a package, but it won't bundle with webpack because of Uglify issues. In the past I've just included the CDN code in the browser, but I don't want to include any HTML in this package, just a pure JS package.

Anyway to do this?

@daviddias
Copy link
Member

@lightninglu10 you can do require('ipfs/dist/ipfs.min.js') and that will expose an Ipfs global variable which is the IPFS class

@daviddias daviddias added the kind/support A question or request for support label Sep 2, 2017
@daviddias
Copy link
Member

@lightninglu10 did it work for you?

@lightninglu10
Copy link
Author

I didn't try it but will soon.

@daviddias
Copy link
Member

Closing for now, let me know if it doesn't work :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

2 participants