how to run d1 locally when running project with proxy
i want to run my worker and d1 locally. here's how i want to run it
wrangler pages dev --local --d1=DB --compatibility-date=2023-06-17 --proxy 5173 -- pnpm dev
but the DB is not available. that way. if i tried running vite build --watch
and point wrangler to build folder - that works but it takes too long to see coding changes. i can't bring sqlite libs as they depend on node. i am stuck. isn't there a way that i can set up my env so that i can access the DB but at the same time not slow down development while waiting for vite to rebuild?1 Reply
One of the issues with Vite is that the dev server doesn’t eject the server code for Wrangler to pick up. And since Wrangler can’t pick it up, then your code is running without any of your bindings