can you hot reload edge functions with next-on-pages?

can you hot reload functions with next-on-pages? changing page.tsx changes the UI for me.. but doesn't reload the basic api/hello function from @cloudflare/latest, is this by design or a bug? it looks like it tries to reload the function multiple time but doesn't give me a different string.
6 Replies
James
James13mo ago
Are you able to elaborate a bit more on what you mean? If you're talking about local development, you should use next dev.
jcurt
jcurtOP13mo ago
Local development, yes. Just use next dev? No next-on-pages? literally next dev ? I guess your right, that works. uhh.. ok, and then I guess after that, it's just deployment?
James
James13mo ago
Yeah, then you get the nice HMR experience
jcurt
jcurtOP13mo ago
Alright, this also works with KV and the CF object or that won’t work?
James
James13mo ago
For local development bindings, you can use the experimental next-dev module that will be stabilised once we finalise the API, or a proxy like cf-bindings-proxy.
GitHub
Finalize next-dev's DevBindingsOptions API (and remove `__exper...
In #486 we've added the next-dev submodule for adding local bindings to next dev. The submodule exports the setupDevBindings function which accepts a DevBindingsOptions object for the various o...
jcurt
jcurtOP13mo ago
Ty so much!
Want results from more Discord servers?
Add your server