cf-binding-proxy with sveltekit for HMR
I'm using cf-binding-proxy, drizzle ORM, and Sveltekit. I'm using "npx cf-binding-proxy --d1=db" and "npm run dev" at the same time. This is to use HMR of sveltekit. The cf-binding-proxy part continues to rebuild every time the file modifies, making it difficult to access from the npm run dev server. Is there a similar problem or any workaround?
6 Replies
Rebuilds create the error "Error: EBUSY: resourcebusy or locked," which makes it inaccessible on the npm run dev server.
cf-bindings-proxy does not build stuff. Not sure what you mean by it rebuilds when a file is modified?
Yes sir. I've moved from Vercel to CF. I'm at a loss because I can't use HMR. Is there a way to solve it?
well i still dont understand what is supposed to be rebuilding
cf-bindings-proxy isn't a build tool
However, every time I modify the file, it is rebuilt.
[wrangler:inf] POST / 200 OK (9ms)
[wrangler:inf] POST / 200 OK (3ms)
The file src\routes\-----\+page.svelte changed, restarting build...
Running custom build: npm run build
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
[email protected] build
vite build
vite v5.0.11 building SSR bundle for production...
that's your dev server, not cf-bindings-proxy