anvilresearch / webcrypto

W3C Web Cryptography API for Node.js
MIT License
82 stars 14 forks source link

Adds documentation that this module cannot be used with Webpack #81

Closed hovenko closed 6 years ago

hovenko commented 6 years ago

Adds some documentation that this module cannot be used with Webpack.

Related to https://github.com/solid/solid/issues/217 and https://github.com/anvilresearch/webcrypto/issues/79

dmitrizagidulin commented 6 years ago

Thanks @hovenko!

Hey, any chance you can also include 'text-encoding': 'TextEncoder' to that list of externals, while you're at it? (That's also a server-side shim that this lib uses, that is present in the browser.)

hovenko commented 6 years ago

I can do that, but my intent was to show how to externalize this library, independent of any other libraries that this module depends on and use.

If one don't use text-encoding (directly) then I think it's not relevant for users of webcrypto/crypto to think about externalizing it...

What do you think?

(I hit the wrong post button and accidentally closed it. Got it reopened.)

dmitrizagidulin commented 6 years ago

I vaguely recall that Webpack includes that library anyways, when excluding webcrypto, but I could be wrong. K, no worries then, thanks again.

hovenko commented 6 years ago

I don't know the inner details of Webpack, but that sounds to my like a strange and (I guess) unwanted behavior.

But when including rdflib for example, then the TextEncoding library might be included transitively by one of the other libraries in that dependency tree, even when webcrypto is externalized. It's on my todo-list to write this kind of documentation to the other libraries used by Solid apps. :)