From 0da4b5e0a5df86eb1d7d5f50dba1d9552608b6b3 Mon Sep 17 00:00:00 2001 From: gnezim Date: Thu, 16 Apr 2026 12:46:34 +0300 Subject: [PATCH] Enable React Router v7 future flags to suppress deprecation warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v7_startTransition warning appeared because react-router 6.30.3 (bundled by Modern.js 2.70.8) emits future flag warnings by default. A full Modern.js 2→3 upgrade was investigated but blocked by @module-federation/modern-js ESM incompatibilities with Rsbuild 2.0 (uses __filename and require.resolve in ESM bundles, and the SSR plugin calls api.modifyWebpackConfig which no longer exists). Instead, opt into all v7 future flags via runtime.router config. This silences the warning and prepares the codebase for an eventual React Router v7 upgrade when the MF plugin catches up. --- modern.config.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modern.config.ts b/modern.config.ts index bd645aac..57798748 100644 --- a/modern.config.ts +++ b/modern.config.ts @@ -10,7 +10,16 @@ export default defineConfig({ entriesDir: "./src", }, runtime: { - router: true, + router: { + future: { + v7_startTransition: true, + v7_relativeSplatPath: true, + v7_fetcherPersist: true, + v7_normalizeFormMethod: true, + v7_partialHydration: true, + v7_skipActionErrorRevalidation: true, + }, + }, }, server: { ssr: {