Skip to content

7.4.0 breaks build: erroneous Missing cloudflareDevProxy() in your vite.config.ts. when its obviously thereΒ #13271

@firxworx

Description

@firxworx

I'm using React Router as a...

library

Reproduction

Upgrade to 7.4.0 (all RR deps -- and yes they're all in sync)

Use cloudflare.

Use cloudflareDevProxy. Here are my exact vite.config.ts imports:

import { defineConfig, loadEnv } from 'vite'
import { reactRouter } from '@react-router/dev/vite'

import { cloudflareDevProxy } from '@react-router/dev/vite/cloudflare'
import { reactRouterHonoServer } from 'react-router-hono-server/dev'
import tsconfigPaths from 'vite-tsconfig-paths'
import tailwindcss from '@tailwindcss/vite'

Run build.

Get a bunch of these erroneous things in RED:

Missing cloudflareDevProxy() in your vite.config.ts.
Please add it to your plugins: import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare";

Complete plugins array:

[
      cloudflareDevProxy({
        getLoadContext({ context }) {
          return { cloudflare: context.cloudflare }
        },
      }),
      reactRouterHonoServer({
        runtime: 'cloudflare',
        serverEntryPoint: './workers/app.ts',
        flag: {
          force_react_19: true,
        },
      }),
      tailwindcss(),
      reactRouter(),
      tsconfigPaths(),
]

Messing around with different cloudflareDevProxy configs does nothing. Actually excluding it causes the RED error message to appear several times in a row when it manifests during attempted build (instead of once at a time).

System Info

pnpm / node 22.13.1 / Ubuntu 22.04 (WSL2)

vite 6.2.2

anything react-router 7.4.0 has issue 
change back to 7.3.0 and issue goes away

Not the same as https://github.com/remix-run/react-router/issues/13263

Used Package Manager

pnpm

Expected Behavior

Update packages to latest react-router and build continues to work without errors.

Actual Behavior

Build breaks and has error message described above.

IDK the test strategy but it would be cool if there were some "representative project" tests (examples repos perhaps) and part of new version release testing a script bumps versions on those projects and then runs dev/build/etc. scripts to make sure no fails or error messages, plus perhaps a basic playwright smoketest

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions