Skip to content
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

Vite: Module "crypto" has been externalized for browser compatibility #152

Open
thgh opened this issue Feb 4, 2024 · 1 comment
Open

Comments

@thgh
Copy link

thgh commented Feb 4, 2024

Vite 5 shows this warning:

[plugin:vite:resolve] Module "crypto" has been externalized for browser compatibility,
imported by "/.../node_modules/bcryptjs/dist/bcrypt.js".
See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility
 for more details.

I think this error would not occur if this package would use the exports field in package.json and export a browser/node version.

@Yuqn
Copy link

Yuqn commented Aug 10, 2024

请问该怎么处理呢,我也是在浏览器出来这个警告

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants