cloudflare / cloudflare/vinext
dev 404s all routes with src/ layout while build+start serve correctly
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 406
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 120
Description
## Setup
- vinext 1.0.0-beta.9, App Router under `src/app` (165 pages, 36 layouts, 33 route handlers)
- `vite.config.ts`: `vinext({ appDir: "src" })` + `cloudflare({ configPath })`
- Also reproduced with default auto-detect (no `appDir`).
## What works
- `vinext check`: 89% compatible
- `vinext build`: green, correct route table
- `vinext start`: serves correctly — real pages (200), auth redirects (307), middleware rewrites, RSC, error boundaries all verified
- Direct call to `buildAppRouteGraph('/abs/path/src', matcher)` returns **192 routes**
## What fails
- `vinext dev`: **every** route 404s with empty body (e.g. existing `/login` page, existing route handlers). No errors in dev log; requests log as `GET /login 404`.
## Expected
Dev serves the same 192-route graph that build/start use. The scanner handles `src/` fine, so this looks like a dev-server request-handling gap rather than discovery.
Contributor guide
Research direction
Start by reproducing the 404s with the shown `vite.config.ts` and `src/app` layout, then compare `vinext dev` request handling with the working build/start path. Trace how `buildAppRouteGraph('/abs/path/src', matcher)` produces the 192 routes and verify that dev serves existing pages and route handlers instead of returning empty 404 responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100