launchdarkly / cloudflare-edge-sdk

LaunchDarkly Server-side SDK for Cloudflare Workers
Other
3 stars 3 forks source link

Not working on Cloudflare Workers... #13

Closed t-botz closed 2 years ago

t-botz commented 2 years ago

"edge-sdk" imply to me that you can run this lib on the edge, which means, no node dependencies... When running on Cloudflare workers this lib fails to a fair amount of dependencies to crypto and os

bwoskow-ld commented 2 years ago

Hi @t-botz,

Thanks for trying out our Cloudflare SDK. Webpack should automatically load the polyfills necessary for the Node dependencies. Can you compare your configuration to this template? See our Cloudflare integration documentation for more information.

More long term, we plan on updating our Cloudflare SDK to not have any transitive Node package dependencies. However, as this update isn't currently available, today we need to work around this problem with polyfills.

Cheers, @bwoskow-ld

dannyrb commented 2 years ago

@bwoskow-ld, do you know if the worker template is compatible with the latest version of wrangler? The steps outlined here appear to be outdated:

bwoskow-ld commented 2 years ago

Hi @dannyrb, my colleague @ldhenry responded to your other issue regarding wrangler compatibility. Take a look at his response.

t-botz commented 2 years ago

Yes thanks, its working 🙂