You can probably just remove the function all together and just fetch whatever data you need in the
You can probably just remove the function all together and just fetch whatever data you need in the astro component. 
node_compat = true to your wrangler.toml. For a while, this worked in dev for Pages and not prod, and now it doesn't work in either. That's a pretty crummy DX and I think the Pages team is very aware of that._worker.js yourself if you need to do anything complex env.ASSETS: https://developers.cloudflare.com/pages/platform/functions/advanced-mode/_routes.json: https://developers.cloudflare.com/pages/platform/functions/routing/#creating-a-_routesjson-file