News for hackers. Stuff that matters.
Re:Cloudflare Workers by JackC on Sunday June 02, 2019 @08:00AM (#20074940)
I love the idea of Workers! The catch I ran into last year was the 1MB limit for webpacked JS files. That puts many npm packages off limits -- I ended up doing some webpack magic to stub out subdependencies I didn't need from a package that didn't support tree shaking, which is pretty far from "just works."

Here's a good thread where the problem package was a SOAP library depending on "request," but the same logic is easy to run into with any app: https://community.cloudflare.com/t/worker-size-limit-a-probl...

The upshot is if you have an idea that would be easy with dependencies, you can't reason about how difficult/possible it will be with Workers until you spend some time figuring out if the dependencies can be compressed small enough to use -- and the answer may change partway through if you need to add something.

Re:Cloudflare Workers by avidal on Sunday June 02, 2019 @09:21AM (#20075260)
While we haven't relaxed the 1MB restriction, we have made some changes to the way we compress and distribute your code to the edge. I'd encourage you to try again, and our new CLI[0] handles the webpacking for you.

[0] https://workers.cloudflare.com/docs/quickstart/cli-setup/

Re:Cloudflare Workers by maltalex on Sunday June 02, 2019 @08:05AM (#20074956)
> I love the idea of Workers!

Could you share your use case for Workers?