best approach to apply pollyfills?
A library I want to use within a CF worker imports “crypto”, so I need to apply a pollyfill that will use node:crypto instead. I’ve never messed around with pollyfills so I am not sure how to go about this correctly.
2 Replies
This, probably: https://esbuild.github.io/api/#alias
Thank you. This is also interesting
https://github.com/cloudflare/workers-sdk/tree/main/fixtures/isomorphic-random-example
Perhaps I can patch the library by creating a workerd export
GitHub
workers-sdk/fixtures/isomorphic-random-example at main · cloudflare...
⛅️ Home to Wrangler, the CLI for Cloudflare Workers® - cloudflare/workers-sdk