Open derekperkins opened 3 years ago
Interesting! I wasn't aware of this, I haven't used Cloudflare Workers at all.
I'd happily support Cloudflare Workers if possible, but I'm not sure exactly what environment checks would work for that case. Could you look into it, and open a PR?
The good news is that it's not too difficult. Library authors just need to expose an API entry point where one can pass in a WebAssembly.Module
. You can see a cloudflare worker that brotli compresses in a sample project of mine: https://github.com/nickbabcock/cloud-functions/tree/a44260fdbdeab4edda3ca8c84227217bd9dbfb3d/src/brotli
(I'm not a user of this library, but I just happened to see this issue and know of a solution).
The browser version relies on document (not available) The node version relies on the core util module (not available)
cc @tannerlinsley