Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

Totally random, but I want to give a

Totally random, but I want to give a Friday shoutout to the team working on Wrangler and the Vite Plugin. Migrated my (quite large) Remix/RR7 project from the dev proxy plugin to the official Cloudflare plugin some weeks ago, and the experience was...rough (if you scroll up you'll see I was not a happy camper and was afraid I'd have to roll back. It was a big migration for us because we had a lot of assumptions about the proxy plugin in our codebase 😆) But over the last few weeks the updates the team did to the plugin fixed the issues with some iteration and discussion on the github repo. We've been running 1.11.2 since it got published and its really solid now....

? about fix for vite-based project whose frameworks leak cloudflare:* in node

any vite-plugin devs, question for you i'm thinking about a fix for rrv7 prerender when exporting a DO or class that extends from a DO?

It’d be great to see the skeleton on how you got those to work. This reads fantastic!

I stopped using Cloudflare RPC for this reason and I wanted RPC all the way to the browser. Instead, I implemented a simple JSON-RPC Server in my DO's fetch handler and a proxy in my Worker. For my newer stuff, I'm using the Agent DO base class, My JSON-RPC server code is in the onMessage handler. I created a simple wrapper for AgentClient in my client-side code that implements the client-side of RPC so now I have JSON-RPC over Websockets all the way to/from the browser over WebSockets. My Worker code is now super-simple. It simply runs the Cloudflare-provided routeAgentRequest with my own code to handle authentication. I highly recommend you look into the Agent base class. Even if you never use the AI Agent stuff, it has PartyServer baked in which manages your WebSocket connections including reconnects afer network drop outs....