How to access the Pages ASSETS binding with getPlatformProxy
Hi folks, I'm migrating a large react app to Pages. I'm implementing a hot-reload server for my pages app, which is using advanced mode for server-side rendering.
When I build the app, it works, but for development I hit a problem where I'm unable to serve static files because the
ASSETS
binding is undefined after I use Wrangler's getPlatformProxy
.
I wrote this Vite proxy to have a nice development environment, inspired by Remix's dev proxy. My goal is to be as close as possible to the production SSR environment.
How would you serve static files here?0 Replies