npm / @react-router/dev
@react-router/dev
What changed in @react-router/dev 7 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
11 breaking1 security4 deprecations11 new APIs and options5 behavior and defaults7 tooling11 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@react-router/dev 835 changes
Breaking changes 10
API-only configuration is rejected in RSC Framework Mode.
The flag was removed, and prerendering with the Vite Environment API is now the default.
The flag was removed because trailing slash-aware data request URLs are now the default behavior.
The flag was removed because the Vite Environment API is always enabled.
The minimum supported Node.js version is now 22.22.0.
The dev proxy export was removed; use @cloudflare/vite-plugin instead.
The option replaces
future.v8_splitRouteModulesat the top level. It defaults to true; set it to false to keep route modules in one chunk or to "enforce" to require all routes to be splittable.Trailing slash-aware data request URLs are now the default behavior.
Vite 7 or later is required, and the Vite Environment API build path is mandatory.
Support for wrangler@3 as a peer dependency of @react-router/dev was dropped.
Security 1
Action submissions behind an HTTPS reverse proxy now construct request.url using X-Forwarded-Proto; configure proxies to overwrite client-supplied values.
Deprecations 1
The --no-typescript flag is deprecated ahead of its removal in React Router v9.
New APIs and options 7
This flag opts into application-controlled route discovery in conventional Framework Mode.
Set
ssr: "unstable_api-only"to retain a runtime server for loaders, actions, and route discovery while disabling production document rendering; API-only builds default to lazy route discovery and support prerendered pages and data files with a SPA fallback.Configure the origin for API-only loader, action, and route discovery requests.
RSC Framework Mode now supports the subResourceIntegrity config option.
Adds a client build version virtual module for RSC.
Custom app/entry.ssr.tsx files can import this virtual module and pass its hashes to React's importMap render option.
This flag opts Node Framework mode apps into renderToReadableStream instead of renderToPipeableStream; it has no effect when an app has its own entry.server.tsx.
Behavior and default changes 2
Non-Node Framework mode apps use a Web Streams default server entry with renderToReadableStream; apps using Node server adapter dependencies continue to use renderToPipeableStream.
The Vite server condition is added only for Framework mode apps that declare a Node server adapter dependency, preventing non-Node SSR runtimes from resolving Node-specific package exports by default.
Tooling 5
Vite preview serves prerendered pages and the SPA fallback while retaining live data requests and route discovery.
Using --no-typescript no longer requires Prettier at runtime because JavaScript entry files are generated at package build time.
Restarts the dev server with --conditions=development when that condition is not already configured.
TypeScript 7 can now be used with this package.
The framework dependency installer detects nub as a supported package manager.
Fixes and other changes 9
Dev critical CSS collection no longer registers server-only route imports as client dependencies, avoiding dependency re-optimization and full page reloads.
Prerender requests use the Vite preview server's bound address and avoid re-resolving localhost, preventing intermittent connection-refused errors.
Source maps for route modules are fixed in unstable RSC Framework Mode.
Server-only route exports are preserved in additional Vite server environments in both API-only and SSR modes.
Development conditions are passed as CLI flags when the dev process is relaunched.
Stack trace locations for split route modules are fixed when source maps are enabled in the reactRouter Vite plugin.
Fixes crashes under the Bun runtime when Babel default imports are already unwrapped.
The buildEnd hook now runs after prerendering is completed when using the new prerendering plugin.
Internal prerender requests to the Vite preview server use node:http instead of fetch to fix a Windows libuv assertion during prerendering.
@react-router/dev 715 changes
Breaking changes 1
This unstable flag is no longer supported and errors during config resolution; use future.v8_trailingSlashAwareDataRequests instead.
Deprecations 3
Future flag warnings are logged for this upcoming React Router v8 flag.
Future flag warnings are logged for this upcoming React Router v8 flag.
Future flag warnings are logged for this upcoming React Router v8 flag.
New APIs and options 4
Enables middleware in Framework mode, allowing code to run before and after Response generation for a matched path.
Passes the raw HTTP request to handlers instead of normalizing request.url; use the sibling url parameter for normalized routing logic.
Enables client-side route exports to be split into independently loaded chunks, improving performance for client-side data loading.
Preserves trailing slash semantics in data request URLs, using /_.data for trailing-slash routes and the root data request.
Behavior and default changes 3
Framework Mode build hooks ignore external server environments and process only the app's own server build when future.v8_viteEnvironmentApi is enabled.
When enabled, RSC route module server exports are no longer scanned by the client dependency optimizer.
This is the stabilized replacement for future.unstable_trailingSlashAwareDataRequests.
Tooling 2
Vite server.watch config is now passed to the child compiler in development mode.
Enables support for Vite's experimental Environment API; custom configuration relying on isSsrBuild may need to move under per-environment configuration.
Fixes and other changes 2
Future flag warning URLs are fixed, and each warning is logged only once.
Fixes server-build virtual module import paths when Vite base and React Router basename both match the app directory name.