Remix 2 is in maintenance and supports only React 18, Vite 5/6 and
TypeScript 5. React Router 7 is its successor (framework mode) and
supports React 18/19, Vite 5 to 8 and TypeScript 5/6.
- @remix-run/* -> react-router, @react-router/dev, @react-router/node.
- react-router.config.ts (ssr: false, the GitHub Pages basename) and
app/routes.ts (the single index route).
- Entries: HydratedRouter / ServerRouter; abortDelay -> streamTimeout.
- Scripts: react-router build / dev; start serves build/client with
sirv, like the CLI (remix-serve needed a server build, which a
single-page app does not have, so start did not work).
The built report is pixel-identical to the Remix build (home view and
comparison overlay of the demo report), also under the GitHub Pages
base path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Step 2 of the visual reporter upgrade: move the report app from Remix 2 to React Router 7 (framework mode).
Remix 2 is in maintenance and supports only React 18, Vite 5/6 and TypeScript 5 (we use TypeScript 6 since #1283, which gave a peer warning). React Router 7 is its official successor and supports React 18/19, Vite 5–8 and TypeScript 5/6, so it unblocks React 19 (#1264) and Vite 8 (#1263).
All these packages are development dependencies of the reporter: they build the static report UI (
build/client), which the CLI copies and serves. Users do not install them.Changes
@remix-run/dev,node,react,serve→react-router,@react-router/dev,@react-router/node(7.18.4).react-router.config.ts:ssr: false(static single-page app) and the GitHub Pagesbasename, which were plugin options before.app/routes.ts: the single index route (routes/_index.tsx).entry.client.tsx:RemixBrowser→HydratedRouter.entry.server.tsx:RemixServer→ServerRouter,abortDelay→export const streamTimeout.root.tsx: imports fromreact-router.tsconfig.json:@react-router/nodetypes.vite.config.ts: thereactRouter()plugin.build:report→react-router build;dev:remix→dev:app(react-router dev).start→sirv build/client --single, like the CLI. The oldremix-serve ./build/server/index.jscould not work: a single-page app build has nobuild/server..gitignore:/.react-router(type generation folder). README: "Created with React Router".Test
GITHUB_PAGES=/visual-testing/, served under/visual-testing/): renders the same report, 0 different pixels.pnpm startnow serves the report (HTTP 200).typecheck, Oxlint,pnpm test(1077 unit tests), frozen install: pass.pnpm peers check: the Remix TypeScript peer warnings are gone. The remaining TypeScript one comes fromtsconfck(used byvite-tsconfig-paths5), for step 4.The build shows React Router "future flag" notes about v8; they are only information for a later move to React Router 8.
No changeset: development dependencies only, and the built UI does not change.
🤖 Generated with Claude Code