For some feedback (not a bug), since
For some feedback (not a bug), since wrangler 'lost' the capability to 'port forward' a dev server, it's been a nightmare to develop a Pages project with Functions...
Regular pages: just ignore wrangler and use 'bun run dev' or whatever you're using; it'll update automatically on file save;
Regular Worker: same thing, just run with wrangler and it'll auto-detects changes automatically and reload;
Pages + Functions: nightmare -- the 'only way' (AFAIK) for it to work is 'bun run build' (or npm or whatever) and then ask wrangler to 'serve' the dist folder (if using Astro, otherwise some other public folder). But the 'build' only does the process once, it doesn't keep rebuilding. And if it kept rebuilding, since the process would 'hang' and not exit, then chaining the commands
bun run build && wrangler pages dev dist
would no longer work...
I guess I could simply have two terminals opens, one for hot-rebuilding to the 'dist' folder, and another with wrangler to automatically detect changes in that folder and reload/serve them. But there has to be a better way, right?1 Reply
Bun for local development (instead of npm) and Astro as a framework.
Isn't the CF adapter just for SSR?