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
Upgrading to vite 3.1.4 - Module path has been externalized for browser in Chrome #10302
Comments
Hello @rezelute. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
Thanks for the reply. This error doesnt seem to happen with version 2 of vite for some reason. |
Because you were saying "bcrypt", I thought it was BTW the warning is happening because |
Ah sorry about the confusion about bcrypt vs bcryptjs 😬. |
Yes, I would recommend that. |
Describe the bug
In a project I am currently using vite 2.9.15 and everything is working fine. When i upgraded to vite 3.1.4, I now get the following warning in Chrome:
browser-external:crypto:9 Module "crypto" has been externalized for browser compatibility. Cannot access "crypto.randomBytes" in client code.
It seems to be coming from importing bcrypt in a file but why is it throwing this warning after upgrading to the new vite version.
I have double checked this to make sure its the vite version causing issues by creating a new branch.
Any advice for what you think might be happening is appreciated!
Reproduction
Install the latest version of vite and import bcrypt
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: