PeculiarVentures / webcrypto

A WebCrypto Polyfill for NodeJS
MIT License
185 stars 23 forks source link

fix: import Buffer before use #67

Closed achingbrain closed 10 months ago

achingbrain commented 11 months ago

Importing node's Buffer class before use makes bundling apps simpler because when your target is an environment that doesn't have a Buffer global, you don't have to ensure you've mutated the global object to add Buffer support before @peculiar/webcrypto is loaded - you can just do it by configuring the module resolver with a polyfill instead and let the user load modules in whatever order they want.

This makes bundling react-native apps a bit simpler.

achingbrain commented 10 months ago

@microshine are there any changes you want made here or can this be merged?

microshine commented 10 months ago

NPM package v1.4.4 has been published 🎉

achingbrain commented 10 months ago

Awesome, thanks!