Using Tanstack Start with Cloudflare Workers D1 bindings triggers refresh #4963
-
I'm running into a tricky issue using Cloudflare Workers / Tanstack Start. I've set up my bindings as outlined in Cloudflare's docs:
So now I can access the D1 instance at I create the DB in
But any time I await a call to Which is the same page I was on before. I'm at a loss as to why this could be happening. I've verified that it's an issue with the D1 object specifically, since calling Does anyone here have experience using D1 with tanstack start or an explanation as to why this is happening? To my understanding everything in the handler should (and does, based on my logging) execute on the server. So then, what could be triggering a refresh / navigation? I can repro if necessary but I figure it can't hurt to go ahead and ask and see if anyone has run into this before sinking time into that. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Finally figured this one out. Had to update my vite config to ignore the DB file. Writes to the local DB were triggering HMR or whatever, causing the behavior:
|
Beta Was this translation helpful? Give feedback.
Finally figured this one out. Had to update my vite config to ignore the DB file. Writes to the local DB were triggering HMR or whatever, causing the behavior: