-
Notifications
You must be signed in to change notification settings - Fork 568
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
fix: don't load websockets w/o crypto support #1868
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Q: Dose web crypto come with every new-ish NodeJS version? is it only Follow up Q (if web crypto is available in all builds): Can we use web crypto instead whenever it's available and perhaps fallback to |
If there is no crypto it's because Node was built without OpenSSL. This is a remote case, but we also test this in Node CI. |
@KhafraDev why are we building Websocket in the Nodejs bundle? We don't use it there (yet). |
@mcollina we aren't, I don't really know why it's being imported. Thinking it over, the issue might not be fixed since the node bundle shouldn't be using index.js? This is the file that node should be using: https://github.com/nodejs/undici/blob/main/index-fetch.js, it doesn't import websocket anywhere. Nothing else should be using the websocket utils either. |
The esbuild bundle analyser says the following:
#1869 removes it from the bundle. |
No description provided.