1. Remix with Vite currently relies on Wrangler's getPlatformProxy() that uses miniflare under the h

  1. Remix with Vite currently relies on Wrangler's getPlatformProxy() that uses miniflare under the hood. This setup means Remix is running on Node.js and accessing the Env through HTTP getPlatformProxy().
  2. By following this PR, you can leverage more features specifically designed for Cloudflare Workers, remix with cloudflare pages will have bumpy journey ahead
  3. Run the following commands to set up your development environment:
    • remix vite:dev on port 3000
    • wrangler dev --define "process.env.NODE_ENV:'production'" --log-level=info --port=3001 --test-scheduled app/worker.ts
Note: worker.ts should be ESM-based for Cloudflare Workers.
wrangler dev
enables you to develop queues, crons, and workflows within workerd environment instead of NodeJS.

the error you're encountering is because getPlatformProxy() doesn’t work with workflows. If you have [[workflows]] in wrangler.toml, Miniflare will refer to it, resulting in the error

the development experience for a Vite-powered app has limitations, especially with newer features. This should improve once Vite v6 is released, and Wrangler is updated to support it
Was this page helpful?