-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buffer is not defined in browser #49
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In this code file: https://github.com/paragonie/sodium-plus/blob/master/lib/keytypes/ed25519sk.js#L17 a reference is made to the global Buffer object.
When using in a browser bundler that does not shim nodejs builtins, like vite, this code fails.
The fix is importing from 'buffer' library, which is listed in the dependencies of sodium-plus.
Thank you for this super useful library too - makes life much easier !
The text was updated successfully, but these errors were encountered: