vitedge icon indicating copy to clipboard operation
vitedge copied to clipboard

Integrating polyfills for node in cloudflare e.g. url, http, crypto

Open Gooseware opened this issue 3 years ago • 0 comments

Hi All ... is there a good way to polyfill ? I have tried to use this https://medium.com/@ftaioli/using-node-js-builtin-modules-with-vite-6194737c2cd2 ... but it doesn't seem to be working.

There are some functions server side that i would like to get working that use crypto, http, and url... i could find other ways of doing the same thing but i think a clear guide on how to implement polyfills using vitedge would be pretty good moving forward.

(bonus marks for fs if we can get parity of the interface into KV it would be a pretty nice bonus Cloudflare polyfill)

Gooseware avatar May 27 '22 01:05 Gooseware