Enable React Router v7 future flags to suppress deprecation warning
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.
This commit is contained in:
+10
-1
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user