-
Notifications
You must be signed in to change notification settings - Fork 182
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
Can't used in browser? #134
Comments
Finally, how did you solve it? I also have this problem at present |
If buffer is undefined,you can install it. window.global = { crypto:window.crypto }; |
I am also getting this issue when using Vite in a react project, but the above suggestions don't seem to help. |
I want to use serialize-javascript in vite project.
There are two problem,At first buffer is undefined,I install buffer,and then there is an error at randombytes,the error code is here:
In browser,global is undefined!
I try to change it as this:
And then,serialize-javascript wrok!
The text was updated successfully, but these errors were encountered: