[⚡ Feature]: Dev mode polyfill for cloudflare:sockets
Description
I use cloudflare:sockets to connect to my postgres database. It works fine in preview mode, however developing with it is pretty much impossible, due to the module not being available.
It'd be great if there was some kind of polyfill impl of cloudflare:sockets, so that it could be used in dev mode.
Additional Information
No response
Would you like to help?
- [ ] Would you like to help implement this feature?
@n3oney I think that this issue is not specific to next-on-pages but to any nodejs dev server that targets cloudflare (that might use getPlatformProxy for example) and I guess there would be more modules that would need to be polyfilled
Could you create a feature request issue in workers-sdk: https://github.com/cloudflare/workers-sdk/issues/new?assignees=&labels=enhancement&projects=&template=feature-request.yaml&title=%F0%9F%9A%80+Feature+Request%3A asking for such polyfills?
if we had them there then adding them to next-dev should be pretty straightforward 🙂
https://github.com/cloudflare/workers-sdk/issues/5555