Multiple reasons, size limits, custom config per page/route, separate api endpoints & frontend pages
Multiple reasons, size limits, custom config per page/route, separate api endpoints & frontend pages, better analytics, etc.
response.clone() or request.clone()) but did not read the body of both branches. This is wasteful, as it forces the system to buffer the entire stream of data in memory, rather than streaming it through. This may cause your worker to be unexpectedly terminated for going over the memory limit. If you only meant to copy the request or response headers and metadata (e.g. in order to be able to modify them), use the appropriate constructors instead (for instance, new Response(response.body, response), new Request(request), etc)." response.clone() or request.clone(). Can someone please explain what needs to be done in this case?_worker.js that just reexports your Worker. wrangler should autobundle for you anywaytsc at all_worker.js bundling, so you could keep the same structure, and just have _worker.js be resolve, return an error instead._routes.json generation in Astro's cloudflare adapter /build/worker/shim.mjs file, instead of the expected /functions/_worker.js.&& mv it in my build commandresponse.clone()response.clone()request.clone()request.clone()new Response(response.body, response)new Request(request)_worker.js_worker.js_worker.jstschandleresolve/build/worker/shim.mjs/functions/_worker.js&& mvimport worker from "../src";
export default worker;