You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deploying to Cloudflare there's no way to customize the worker. This means no Durable Objects, no RPC methods, no CRON jobs, just the fetch() handler.
Describe the proposed solution
Currently when building with the adapter-cloudflare the entry Worker file gets generated at .svelte-kit/cloudflare/_worker.js. At its core it just exports the fetch handler for the Worker.
// other stuff...varworker_default={asyncfetch(req,env,context){// request handling...}};export{worker_defaultasdefault};
Other frameworks like React Router create a workers folder in the root directory of the project containing app.ts—the worker script. It looks like this:
Describe the problem
When deploying to Cloudflare there's no way to customize the worker. This means no Durable Objects, no RPC methods, no CRON jobs, just the
fetch()
handler.Describe the proposed solution
Currently when building with the
adapter-cloudflare
the entry Worker file gets generated at.svelte-kit/cloudflare/_worker.js
. At its core it just exports thefetch
handler for the Worker.Other frameworks like React Router create a
workers
folder in the root directory of the project containingapp.ts
—the worker script. It looks like this:React Router basically provides a handler you can use in your worker in the
fetch()
. Why wouldn't SvelteKit be able to provide something similar?Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: