Moving Towards Cloudflare Workers Modules
Sunder now supports the the new ES Modules syntax for Cloudflare Workers. By opting into modules you can get rid of relying on global variables floating around your codebase, and also unlock Durable Objects.
Before this was an option the entrypoint to your application would look something like this:
Now, new in version 0.8.0
, there is also a fetch
function on the app which allows you to use the new syntax easily.