Bindings not available at build time

I have a SvelteKit app that has some prerendered api/page routes. These routes should ideally be rendered with data from KV/D1, but despite the bindings being available in non-prerendered routes runtime, they are not available during build time. Is this the expected behaviour and if so, what's the recommended way around this?
2 Replies
kian
kian5mo ago
That’s expected - build time is just an Ubuntu container, not a Worker
Nicolas A.
Nicolas A.5mo ago
Same needs here with a prerendered site. I need to query D1. I use wrangler-proxy but queries are slow (100ms) and build time is too long with many pages to process. (100ms from my local computer, 300-500ms from the CF build, very slow ...)