>()
@@ -159,10 +180,6 @@ export function createRouterCodeSplitterPlugin(
sharedBindingsMap.delete(id)
}
- const addHmr =
- (userConfig.codeSplittingOptions?.addHmr ?? true) && !isProduction
- const hmrStyle = userConfig.plugin?.hmr?.style ?? 'vite'
-
const compiledReferenceRoute = compileCodeSplitReferenceRoute({
code,
codeSplitGroupings: splitGroupings,
@@ -176,14 +193,7 @@ export function createRouterCodeSplitterPlugin(
hmrStyle,
hmrRouteId: generatorNodeInfo.routeId,
sharedBindings: sharedBindings.size > 0 ? sharedBindings : undefined,
- compilerPlugins: [
- ...(getReferenceRouteCompilerPlugins({
- targetFramework: userConfig.target,
- addHmr,
- hmrStyle,
- }) ?? []),
- ...(userConfig.codeSplittingOptions?.compilerPlugins ?? []),
- ],
+ compilerPlugins,
})
if (compiledReferenceRoute === null) {
@@ -232,6 +242,7 @@ export function createRouterCodeSplitterPlugin(
filename: id,
splitTargets: grouping,
sharedBindings: resolvedSharedBindings,
+ compilerPlugins: virtualRouteCompilerPlugins,
})
if (debug) {
@@ -276,6 +287,7 @@ export function createRouterCodeSplitterPlugin(
vite: {
configResolved(config) {
+ isProduction = config.command === 'build'
ROOT = config.root
initUserConfig()
@@ -319,12 +331,14 @@ export function createRouterCodeSplitterPlugin(
},
},
- rspack() {
+ rspack(compiler) {
+ isProduction = compiler.options.mode === 'production'
ROOT = process.cwd()
initUserConfig()
},
- webpack() {
+ webpack(compiler) {
+ isProduction = compiler.options.mode === 'production'
ROOT = process.cwd()
initUserConfig()
},
diff --git a/packages/router-plugin/src/core/router-hmr-plugin.ts b/packages/router-plugin/src/core/router-hmr-plugin.ts
index 75dfde11f8..e1dc01a43b 100644
--- a/packages/router-plugin/src/core/router-hmr-plugin.ts
+++ b/packages/router-plugin/src/core/router-hmr-plugin.ts
@@ -1,6 +1,6 @@
import { generateFromAst, logDiff, parseAst } from '@tanstack/router-utils'
import { compileCodeSplitReferenceRoute } from './code-splitter/compilers'
-import { getReferenceRouteCompilerPlugins } from './code-splitter/plugins/framework-plugins'
+import { getFrameworkHmrCompilerPlugins } from './code-splitter/plugins/framework-plugins'
import { createRouteHmrStatement } from './hmr'
import { debug, normalizePath, routeFactoryCallCodeFilter } from './utils'
import { getConfig } from './config'
@@ -50,9 +50,8 @@ export function createRouterHmrPlugin(
const hmrStyle = userConfig.plugin?.hmr?.style ?? 'vite'
if (userConfig.target === 'react') {
- const compilerPlugins = getReferenceRouteCompilerPlugins({
+ const compilerPlugins = getFrameworkHmrCompilerPlugins({
targetFramework: 'react',
- addHmr: true,
hmrStyle,
})
const compiled = compileCodeSplitReferenceRoute({
diff --git a/packages/router-plugin/src/index.ts b/packages/router-plugin/src/index.ts
index e390c046a2..6a6ad158bb 100644
--- a/packages/router-plugin/src/index.ts
+++ b/packages/router-plugin/src/index.ts
@@ -13,8 +13,10 @@ export type {
export type { RouterPluginContext } from './core/router-plugin-context'
export { getObjectPropertyKeyName } from './core/utils'
export type {
+ CodeSplitCompilerPlugin,
ReferenceRouteCompilerPlugin,
ReferenceRouteCompilerPluginContext,
+ VirtualRouteSplitNodeCompilerPluginContext,
} from './core/code-splitter/plugins'
export {
tsrSplit,
diff --git a/packages/router-plugin/tests/add-hmr.test.ts b/packages/router-plugin/tests/add-hmr.test.ts
index 4430cef74c..52c2645409 100644
--- a/packages/router-plugin/tests/add-hmr.test.ts
+++ b/packages/router-plugin/tests/add-hmr.test.ts
@@ -4,7 +4,7 @@ import { describe, expect, it } from 'vitest'
import { compileCodeSplitReferenceRoute } from '../src/core/code-splitter/compilers'
import { defaultCodeSplitGroupings } from '../src/core/constants'
-import { getReferenceRouteCompilerPlugins } from '../src/core/code-splitter/plugins/framework-plugins'
+import { getFrameworkHmrCompilerPlugins } from '../src/core/code-splitter/plugins/framework-plugins'
import { createRouteHmrStatement } from '../src/core/hmr'
import { frameworks } from './constants'
@@ -32,9 +32,8 @@ describe('add-hmr works', () => {
addHmr: true,
codeSplitGroupings: defaultCodeSplitGroupings,
targetFramework: framework,
- compilerPlugins: getReferenceRouteCompilerPlugins({
+ compilerPlugins: getFrameworkHmrCompilerPlugins({
targetFramework: framework,
- addHmr: true,
}),
})
@@ -57,10 +56,6 @@ describe('add-hmr works', () => {
addHmr: false,
codeSplitGroupings: defaultCodeSplitGroupings,
targetFramework: framework,
- compilerPlugins: getReferenceRouteCompilerPlugins({
- targetFramework: framework,
- addHmr: false,
- }),
})
await expect(compileResult?.code || code).toMatchFileSnapshot(
@@ -86,9 +81,8 @@ describe('add-hmr works', () => {
hmrStyle: 'webpack',
codeSplitGroupings: defaultCodeSplitGroupings,
targetFramework: framework,
- compilerPlugins: getReferenceRouteCompilerPlugins({
+ compilerPlugins: getFrameworkHmrCompilerPlugins({
targetFramework: framework,
- addHmr: true,
hmrStyle: 'webpack',
}),
})
diff --git a/packages/router-plugin/tests/add-hmr/snapshots/react/createFileRoute-lowercase-components@false.tsx b/packages/router-plugin/tests/add-hmr/snapshots/react/createFileRoute-lowercase-components@false.tsx
new file mode 100644
index 0000000000..a2983e31bd
--- /dev/null
+++ b/packages/router-plugin/tests/add-hmr/snapshots/react/createFileRoute-lowercase-components@false.tsx
@@ -0,0 +1,12 @@
+const $$splitComponentImporter = () => import('createFileRoute-lowercase-components.tsx?tsr-split=component');
+const $$splitErrorComponentImporter = () => import('createFileRoute-lowercase-components.tsx?tsr-split=errorComponent');
+import { lazyRouteComponent } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router';
+export const Route = createFileRoute('/lowercase-components')({
+ pendingComponent: pendingComponent,
+ errorComponent: lazyRouteComponent($$splitErrorComponentImporter, 'errorComponent'),
+ component: lazyRouteComponent($$splitComponentImporter, 'component')
+});
+function pendingComponent() {
+ return Pending
;
+}
\ No newline at end of file
diff --git a/packages/router-plugin/tests/add-hmr/snapshots/react/createFileRoute-lowercase-components@true.tsx b/packages/router-plugin/tests/add-hmr/snapshots/react/createFileRoute-lowercase-components@true.tsx
new file mode 100644
index 0000000000..b04afe83f4
--- /dev/null
+++ b/packages/router-plugin/tests/add-hmr/snapshots/react/createFileRoute-lowercase-components@true.tsx
@@ -0,0 +1,204 @@
+const $$splitComponentImporter = () => import('createFileRoute-lowercase-components.tsx?tsr-split=component');
+const $$splitErrorComponentImporter = () => import('createFileRoute-lowercase-components.tsx?tsr-split=errorComponent');
+import { lazyRouteComponent } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router';
+const TSRSplitErrorComponent = (() => {
+ const hot = import.meta.hot;
+ const hotData = hot ? hot.data ??= {} : undefined;
+ return hotData?.["tsr-split-component:errorComponent"] ?? lazyRouteComponent($$splitErrorComponentImporter, "errorComponent");
+})();
+if (import.meta.hot) {
+ (import.meta.hot.data ??= {})["tsr-split-component:errorComponent"] = TSRSplitErrorComponent;
+}
+const TSRSplitComponent = (() => {
+ const hot = import.meta.hot;
+ const hotData = hot ? hot.data ??= {} : undefined;
+ return hotData?.["tsr-split-component:component"] ?? lazyRouteComponent($$splitComponentImporter, "component");
+})();
+if (import.meta.hot) {
+ (import.meta.hot.data ??= {})["tsr-split-component:component"] = TSRSplitComponent;
+}
+export const Route = createFileRoute('/lowercase-components')({
+ pendingComponent: TSRPendingComponent,
+ errorComponent: TSRSplitErrorComponent,
+ component: TSRSplitComponent
+});
+function TSRPendingComponent() {
+ return Pending
;
+}
+const hot = import.meta.hot;
+if (hot && typeof window !== 'undefined') {
+ hot.data ??= {};
+ const tsrReactRefresh = window.__TSR_REACT_REFRESH__ ??= (() => {
+ const ignoredExportsById = new Map();
+ const previousGetIgnoredExports = window.__getReactRefreshIgnoredExports;
+ window.__getReactRefreshIgnoredExports = ctx => {
+ const ignoredExports = previousGetIgnoredExports?.(ctx) ?? [];
+ const moduleIgnored = ignoredExportsById.get(ctx.id) ?? [];
+ return [...ignoredExports, ...moduleIgnored];
+ };
+ return {
+ ignoredExportsById
+ };
+ })();
+ tsrReactRefresh.ignoredExportsById.set("createFileRoute-lowercase-components.tsx", ['Route']);
+}
+export function TSRFastRefreshAnchor() {
+ return null;
+}
+if (import.meta.hot) {
+ const hot = import.meta.hot;
+ const hotData = hot.data ??= {};
+ const handleRouteUpdate = function handleRouteUpdate(routeId, newRoute) {
+ const router = window.__TSR_ROUTER__;
+ const oldRoute = router.routesById[routeId];
+ if (!oldRoute) {
+ return;
+ }
+ ;
+ const generatedRouteOptionKeys = new Set(["id", "path", "getParentRoute"]);
+ const generatedRouteOptions = {};
+ generatedRouteOptionKeys.forEach(key => {
+ if (key in oldRoute.options) {
+ generatedRouteOptions[key] = oldRoute.options[key];
+ }
+ });
+ const removedKeys = new Set();
+ Object.keys(oldRoute.options).forEach(key => {
+ if (!generatedRouteOptionKeys.has(key) && !(key in newRoute.options)) {
+ removedKeys.add(key);
+ delete oldRoute.options[key];
+ }
+ });
+ const oldHasShellComponent = "shellComponent" in oldRoute.options;
+ const newHasShellComponent = "shellComponent" in newRoute.options;
+ const preserveComponentIdentity = oldHasShellComponent === newHasShellComponent;
+ const componentKeys = ["component", "shellComponent", "pendingComponent", "errorComponent", "notFoundComponent"];
+ if (preserveComponentIdentity) {
+ componentKeys.forEach(key => {
+ if (key in oldRoute.options && key in newRoute.options) {
+ newRoute.options[key] = oldRoute.options[key];
+ }
+ });
+ }
+ ;
+ const nextOptions = {
+ ...newRoute.options,
+ ...generatedRouteOptions
+ };
+ oldRoute.options = nextOptions;
+ oldRoute.update(nextOptions);
+ oldRoute._componentsPromise = undefined;
+ oldRoute._lazyPromise = undefined;
+ router.setRoutes(router.buildRouteTree());
+ syncHotRouteExport(oldRoute);
+ router.resolvePathCache.clear();
+ const filter = m => m.routeId === oldRoute.id;
+ const activeMatch = router.stores.matches.get().find(filter);
+ const pendingMatch = router.stores.pendingMatches.get().find(filter);
+ const cachedMatches = router.stores.cachedMatches.get().filter(filter);
+ if (activeMatch || pendingMatch || cachedMatches.length > 0) {
+ if (removedKeys.has("loader") || removedKeys.has("beforeLoad")) {
+ const matchIds = [activeMatch?.id, pendingMatch?.id, ...cachedMatches.map(match => match.id)].filter(Boolean);
+ router.batch(() => {
+ for (const matchId of matchIds) {
+ const store = router.stores.pendingMatchStores.get(matchId) || router.stores.matchStores.get(matchId) || router.stores.cachedMatchStores.get(matchId);
+ if (store) {
+ store.set(prev => {
+ const next = {
+ ...prev
+ };
+ if (removedKeys.has("loader")) {
+ next.loaderData = undefined;
+ }
+ ;
+ if (removedKeys.has("beforeLoad")) {
+ next.__beforeLoadContext = undefined;
+ next.context = rebuildMatchContextWithoutBeforeLoad(next);
+ }
+ ;
+ return next;
+ });
+ }
+ }
+ });
+ }
+ ;
+ router.invalidate({
+ filter,
+ sync: true
+ });
+ }
+ ;
+ function syncHotRouteExport(liveRoute) {
+ newRoute.options = liveRoute.options;
+ newRoute.parentRoute = liveRoute.parentRoute;
+ newRoute._path = liveRoute._path;
+ newRoute._id = liveRoute._id;
+ newRoute._fullPath = liveRoute._fullPath;
+ newRoute._to = liveRoute._to;
+ }
+ function getStoreMatch(matchId) {
+ return router.stores.pendingMatchStores.get(matchId)?.get() || router.stores.matchStores.get(matchId)?.get() || router.stores.cachedMatchStores.get(matchId)?.get();
+ }
+ function getMatchList(matchId) {
+ const pendingMatches = router.stores.pendingMatches.get();
+ if (pendingMatches.some(match => match.id === matchId)) {
+ return pendingMatches;
+ }
+ ;
+ const activeMatches = router.stores.matches.get();
+ if (activeMatches.some(match => match.id === matchId)) {
+ return activeMatches;
+ }
+ ;
+ const cachedMatches = router.stores.cachedMatches.get();
+ if (cachedMatches.some(match => match.id === matchId)) {
+ return cachedMatches;
+ }
+ ;
+ return [];
+ }
+ function getParentMatch(match) {
+ const matchList = getMatchList(match.id);
+ const matchIndex = matchList.findIndex(item => item.id === match.id);
+ if (matchIndex <= 0) {
+ return undefined;
+ }
+ ;
+ const parentMatch = matchList[matchIndex - 1];
+ return getStoreMatch(parentMatch.id) || parentMatch;
+ }
+ function rebuildMatchContextWithoutBeforeLoad(match) {
+ const parentMatch = getParentMatch(match);
+ const getParentContext = router.getParentContext;
+ const parentContext = getParentContext ? getParentContext.call(router, parentMatch) : parentMatch?.context ?? router.options.context;
+ return {
+ ...(parentContext ?? {}),
+ ...(match.__routeContext ?? {})
+ };
+ }
+ };
+ const initialRouteId = Route.id ?? hotData['tsr-route-id'];
+ if (initialRouteId) {
+ hotData['tsr-route-id'] = initialRouteId;
+ }
+ const existingRoute = typeof window !== 'undefined' && initialRouteId ? window.__TSR_ROUTER__?.routesById?.[initialRouteId] : undefined;
+ if (initialRouteId && existingRoute && existingRoute !== Route) {
+ handleRouteUpdate(initialRouteId, Route);
+ hotData['tsr-route-update-handled'] = Route;
+ }
+ hot.accept(newModule => {
+ if (Route && newModule && newModule.Route) {
+ const routeId = hotData['tsr-route-id'] ?? Route.id;
+ if (routeId) {
+ hotData['tsr-route-id'] = routeId;
+ }
+ if (hotData['tsr-route-update-handled'] === newModule.Route) {
+ delete hotData['tsr-route-update-handled'];
+ return;
+ }
+ handleRouteUpdate(routeId, newModule.Route);
+ }
+ });
+}
\ No newline at end of file
diff --git a/packages/router-plugin/tests/add-hmr/snapshots/react/createRootRoute-lowercase-components@false.tsx b/packages/router-plugin/tests/add-hmr/snapshots/react/createRootRoute-lowercase-components@false.tsx
new file mode 100644
index 0000000000..20c9a07798
--- /dev/null
+++ b/packages/router-plugin/tests/add-hmr/snapshots/react/createRootRoute-lowercase-components@false.tsx
@@ -0,0 +1,25 @@
+import * as React from 'react'
+import { createRootRoute } from '@tanstack/react-router'
+
+export const Route = createRootRoute({
+ shellComponent: shellComponent,
+ pendingComponent: pendingComponent,
+ errorComponent: errorComponent,
+ component: component,
+})
+
+function shellComponent({ children }: { children: React.ReactNode }) {
+ return {children}
+}
+
+function pendingComponent() {
+ return Pending
+}
+
+function errorComponent() {
+ return Error
+}
+
+function component() {
+ return Hello
+}
diff --git a/packages/router-plugin/tests/add-hmr/snapshots/react/createRootRoute-lowercase-components@true.tsx b/packages/router-plugin/tests/add-hmr/snapshots/react/createRootRoute-lowercase-components@true.tsx
new file mode 100644
index 0000000000..d3eae5cb36
--- /dev/null
+++ b/packages/router-plugin/tests/add-hmr/snapshots/react/createRootRoute-lowercase-components@true.tsx
@@ -0,0 +1,200 @@
+import * as React from 'react';
+import { createRootRoute } from '@tanstack/react-router';
+export const Route = createRootRoute({
+ shellComponent: TSRShellComponent,
+ pendingComponent: TSRPendingComponent,
+ errorComponent: TSRErrorComponent,
+ component: TSRComponent
+});
+function TSRShellComponent({
+ children
+}: {
+ children: React.ReactNode;
+}) {
+ return {children};
+}
+function TSRPendingComponent() {
+ return Pending
;
+}
+function TSRErrorComponent() {
+ return Error
;
+}
+function TSRComponent() {
+ return Hello
;
+}
+const hot = import.meta.hot;
+if (hot && typeof window !== 'undefined') {
+ hot.data ??= {};
+ const tsrReactRefresh = window.__TSR_REACT_REFRESH__ ??= (() => {
+ const ignoredExportsById = new Map();
+ const previousGetIgnoredExports = window.__getReactRefreshIgnoredExports;
+ window.__getReactRefreshIgnoredExports = ctx => {
+ const ignoredExports = previousGetIgnoredExports?.(ctx) ?? [];
+ const moduleIgnored = ignoredExportsById.get(ctx.id) ?? [];
+ return [...ignoredExports, ...moduleIgnored];
+ };
+ return {
+ ignoredExportsById
+ };
+ })();
+ tsrReactRefresh.ignoredExportsById.set("createRootRoute-lowercase-components.tsx", ['Route']);
+}
+export function TSRFastRefreshAnchor() {
+ return null;
+}
+if (import.meta.hot) {
+ const hot = import.meta.hot;
+ const hotData = hot.data ??= {};
+ const handleRouteUpdate = function handleRouteUpdate(routeId, newRoute) {
+ const router = window.__TSR_ROUTER__;
+ const oldRoute = router.routesById[routeId];
+ if (!oldRoute) {
+ return;
+ }
+ ;
+ const generatedRouteOptionKeys = new Set(["id", "path", "getParentRoute"]);
+ const generatedRouteOptions = {};
+ generatedRouteOptionKeys.forEach(key => {
+ if (key in oldRoute.options) {
+ generatedRouteOptions[key] = oldRoute.options[key];
+ }
+ });
+ const removedKeys = new Set();
+ Object.keys(oldRoute.options).forEach(key => {
+ if (!generatedRouteOptionKeys.has(key) && !(key in newRoute.options)) {
+ removedKeys.add(key);
+ delete oldRoute.options[key];
+ }
+ });
+ const oldHasShellComponent = "shellComponent" in oldRoute.options;
+ const newHasShellComponent = "shellComponent" in newRoute.options;
+ const preserveComponentIdentity = oldHasShellComponent === newHasShellComponent;
+ const componentKeys = ["component", "shellComponent", "pendingComponent", "errorComponent", "notFoundComponent"];
+ if (preserveComponentIdentity) {
+ componentKeys.forEach(key => {
+ if (key in oldRoute.options && key in newRoute.options) {
+ newRoute.options[key] = oldRoute.options[key];
+ }
+ });
+ }
+ ;
+ const nextOptions = {
+ ...newRoute.options,
+ ...generatedRouteOptions
+ };
+ oldRoute.options = nextOptions;
+ oldRoute.update(nextOptions);
+ oldRoute._componentsPromise = undefined;
+ oldRoute._lazyPromise = undefined;
+ router.setRoutes(router.buildRouteTree());
+ syncHotRouteExport(oldRoute);
+ router.resolvePathCache.clear();
+ const filter = m => m.routeId === oldRoute.id;
+ const activeMatch = router.stores.matches.get().find(filter);
+ const pendingMatch = router.stores.pendingMatches.get().find(filter);
+ const cachedMatches = router.stores.cachedMatches.get().filter(filter);
+ if (activeMatch || pendingMatch || cachedMatches.length > 0) {
+ if (removedKeys.has("loader") || removedKeys.has("beforeLoad")) {
+ const matchIds = [activeMatch?.id, pendingMatch?.id, ...cachedMatches.map(match => match.id)].filter(Boolean);
+ router.batch(() => {
+ for (const matchId of matchIds) {
+ const store = router.stores.pendingMatchStores.get(matchId) || router.stores.matchStores.get(matchId) || router.stores.cachedMatchStores.get(matchId);
+ if (store) {
+ store.set(prev => {
+ const next = {
+ ...prev
+ };
+ if (removedKeys.has("loader")) {
+ next.loaderData = undefined;
+ }
+ ;
+ if (removedKeys.has("beforeLoad")) {
+ next.__beforeLoadContext = undefined;
+ next.context = rebuildMatchContextWithoutBeforeLoad(next);
+ }
+ ;
+ return next;
+ });
+ }
+ }
+ });
+ }
+ ;
+ router.invalidate({
+ filter,
+ sync: true
+ });
+ }
+ ;
+ function syncHotRouteExport(liveRoute) {
+ newRoute.options = liveRoute.options;
+ newRoute.parentRoute = liveRoute.parentRoute;
+ newRoute._path = liveRoute._path;
+ newRoute._id = liveRoute._id;
+ newRoute._fullPath = liveRoute._fullPath;
+ newRoute._to = liveRoute._to;
+ }
+ function getStoreMatch(matchId) {
+ return router.stores.pendingMatchStores.get(matchId)?.get() || router.stores.matchStores.get(matchId)?.get() || router.stores.cachedMatchStores.get(matchId)?.get();
+ }
+ function getMatchList(matchId) {
+ const pendingMatches = router.stores.pendingMatches.get();
+ if (pendingMatches.some(match => match.id === matchId)) {
+ return pendingMatches;
+ }
+ ;
+ const activeMatches = router.stores.matches.get();
+ if (activeMatches.some(match => match.id === matchId)) {
+ return activeMatches;
+ }
+ ;
+ const cachedMatches = router.stores.cachedMatches.get();
+ if (cachedMatches.some(match => match.id === matchId)) {
+ return cachedMatches;
+ }
+ ;
+ return [];
+ }
+ function getParentMatch(match) {
+ const matchList = getMatchList(match.id);
+ const matchIndex = matchList.findIndex(item => item.id === match.id);
+ if (matchIndex <= 0) {
+ return undefined;
+ }
+ ;
+ const parentMatch = matchList[matchIndex - 1];
+ return getStoreMatch(parentMatch.id) || parentMatch;
+ }
+ function rebuildMatchContextWithoutBeforeLoad(match) {
+ const parentMatch = getParentMatch(match);
+ const getParentContext = router.getParentContext;
+ const parentContext = getParentContext ? getParentContext.call(router, parentMatch) : parentMatch?.context ?? router.options.context;
+ return {
+ ...(parentContext ?? {}),
+ ...(match.__routeContext ?? {})
+ };
+ }
+ };
+ const initialRouteId = Route.id ?? hotData['tsr-route-id'];
+ if (initialRouteId) {
+ hotData['tsr-route-id'] = initialRouteId;
+ }
+ const existingRoute = typeof window !== 'undefined' && initialRouteId ? window.__TSR_ROUTER__?.routesById?.[initialRouteId] : undefined;
+ if (initialRouteId && existingRoute && existingRoute !== Route) {
+ handleRouteUpdate(initialRouteId, Route);
+ hotData['tsr-route-update-handled'] = Route;
+ }
+ hot.accept(newModule => {
+ if (Route && newModule && newModule.Route) {
+ const routeId = hotData['tsr-route-id'] ?? Route.id;
+ if (routeId) {
+ hotData['tsr-route-id'] = routeId;
+ }
+ if (hotData['tsr-route-update-handled'] === newModule.Route) {
+ delete hotData['tsr-route-update-handled'];
+ return;
+ }
+ handleRouteUpdate(routeId, newModule.Route);
+ }
+ });
+}
\ No newline at end of file
diff --git a/packages/router-plugin/tests/add-hmr/test-files/react/createFileRoute-lowercase-components.tsx b/packages/router-plugin/tests/add-hmr/test-files/react/createFileRoute-lowercase-components.tsx
new file mode 100644
index 0000000000..a09f8d24e2
--- /dev/null
+++ b/packages/router-plugin/tests/add-hmr/test-files/react/createFileRoute-lowercase-components.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/lowercase-components')({
+ pendingComponent: pendingComponent,
+ errorComponent: errorComponent,
+ component: component,
+})
+
+function pendingComponent() {
+ return Pending
+}
+
+function errorComponent() {
+ return Error
+}
+
+function component() {
+ return Hello
+}
diff --git a/packages/router-plugin/tests/add-hmr/test-files/react/createRootRoute-lowercase-components.tsx b/packages/router-plugin/tests/add-hmr/test-files/react/createRootRoute-lowercase-components.tsx
new file mode 100644
index 0000000000..20c9a07798
--- /dev/null
+++ b/packages/router-plugin/tests/add-hmr/test-files/react/createRootRoute-lowercase-components.tsx
@@ -0,0 +1,25 @@
+import * as React from 'react'
+import { createRootRoute } from '@tanstack/react-router'
+
+export const Route = createRootRoute({
+ shellComponent: shellComponent,
+ pendingComponent: pendingComponent,
+ errorComponent: errorComponent,
+ component: component,
+})
+
+function shellComponent({ children }: { children: React.ReactNode }) {
+ return {children}
+}
+
+function pendingComponent() {
+ return Pending
+}
+
+function errorComponent() {
+ return Error
+}
+
+function component() {
+ return Hello
+}
diff --git a/packages/router-plugin/tests/code-splitter.test.ts b/packages/router-plugin/tests/code-splitter.test.ts
index ae64e2778b..967f102e4d 100644
--- a/packages/router-plugin/tests/code-splitter.test.ts
+++ b/packages/router-plugin/tests/code-splitter.test.ts
@@ -20,6 +20,7 @@ import {
} from '../src/core/code-splitter/compilers'
import { createIdentifier } from '@tanstack/router-utils'
import { defaultCodeSplitGroupings } from '../src/core/constants'
+import { getFrameworkHmrCompilerPlugins } from '../src/core/code-splitter/plugins/framework-plugins'
import { frameworks } from './constants'
import type { CodeSplitGroupings } from '../src/core/constants'
@@ -165,6 +166,62 @@ describe('code-splitter works', () => {
})
})
+describe('React Refresh virtual route compiler plugin', () => {
+ const splitComponentCases = [
+ { splitType: 'component', splitIdentifier: 'SplitComponent' },
+ {
+ splitType: 'pendingComponent',
+ splitIdentifier: 'SplitPendingComponent',
+ },
+ { splitType: 'errorComponent', splitIdentifier: 'SplitErrorComponent' },
+ ] as const
+
+ function createRouteCode(splitType: string) {
+ return `
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/')({ ${splitType} })
+
+function ${splitType}() {
+ return lowercase function declaration
+}
+`
+ }
+
+ it.each(splitComponentCases)(
+ 'renames a lowercase $splitType binding when HMR is enabled',
+ ({ splitType, splitIdentifier }) => {
+ const result = compileCodeSplitVirtualRoute({
+ code: createRouteCode(splitType),
+ filename: `lowercase-function-declaration.tsx?tsr-split=${splitType}`,
+ splitTargets: [splitType],
+ compilerPlugins: getFrameworkHmrCompilerPlugins({
+ targetFramework: 'react',
+ }),
+ })
+
+ expect(result.code).toContain(`function ${splitIdentifier}()`)
+ expect(result.code).toContain(
+ `export { ${splitIdentifier} as ${splitType} }`,
+ )
+ },
+ )
+
+ it.each(splitComponentCases)(
+ 'keeps a lowercase $splitType binding when HMR is disabled',
+ ({ splitType }) => {
+ const result = compileCodeSplitVirtualRoute({
+ code: createRouteCode(splitType),
+ filename: `lowercase-function-declaration.tsx?tsr-split=${splitType}`,
+ splitTargets: [splitType],
+ })
+
+ expect(result.code).toContain(`function ${splitType}()`)
+ expect(result.code).toContain(`export { ${splitType} }`)
+ },
+ )
+})
+
describe('computeSharedBindings fast paths', () => {
it('returns empty when only one split group is present (default groupings)', () => {
const code = `
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration.tsx
new file mode 100644
index 0000000000..b2f908ab45
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration.tsx
@@ -0,0 +1,12 @@
+const $$splitErrorComponentImporter = () => import('lowercase-function-declaration.tsx?tsr-split=errorComponent');
+const $$splitComponentImporter = () => import('lowercase-function-declaration.tsx?tsr-split=component');
+import { lazyRouteComponent } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router';
+export const Route = createFileRoute('/')({
+ component: lazyRouteComponent($$splitComponentImporter, 'component'),
+ pendingComponent,
+ errorComponent: lazyRouteComponent($$splitErrorComponentImporter, 'errorComponent')
+});
+function pendingComponent() {
+ return lowercase pending function declaration
;
+}
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@component.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@component.tsx
new file mode 100644
index 0000000000..65735a0f20
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@component.tsx
@@ -0,0 +1,4 @@
+function component() {
+ return lowercase function declaration
;
+}
+export { component };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@errorComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@errorComponent.tsx
new file mode 100644
index 0000000000..acc1c0be8d
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@errorComponent.tsx
@@ -0,0 +1,4 @@
+function errorComponent() {
+ return lowercase error function declaration
;
+}
+export { errorComponent };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@notFoundComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@notFoundComponent.tsx
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@shared.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/1-default/lowercase-function-declaration@shared.tsx
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration.tsx
new file mode 100644
index 0000000000..75657cb44a
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration.tsx
@@ -0,0 +1,10 @@
+const $$splitErrorComponentImporter = () => import('lowercase-function-declaration.tsx?tsr-split=component---errorComponent---notFoundComponent---pendingComponent');
+const $$splitPendingComponentImporter = () => import('lowercase-function-declaration.tsx?tsr-split=component---errorComponent---notFoundComponent---pendingComponent');
+const $$splitComponentImporter = () => import('lowercase-function-declaration.tsx?tsr-split=component---errorComponent---notFoundComponent---pendingComponent');
+import { lazyRouteComponent } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router';
+export const Route = createFileRoute('/')({
+ component: lazyRouteComponent($$splitComponentImporter, 'component'),
+ pendingComponent: lazyRouteComponent($$splitPendingComponentImporter, 'pendingComponent'),
+ errorComponent: lazyRouteComponent($$splitErrorComponentImporter, 'errorComponent')
+});
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration@component---errorComponent---notFoundComponent---pendingComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration@component---errorComponent---notFoundComponent---pendingComponent.tsx
new file mode 100644
index 0000000000..86876d616e
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration@component---errorComponent---notFoundComponent---pendingComponent.tsx
@@ -0,0 +1,12 @@
+function component() {
+ return lowercase function declaration
;
+}
+function pendingComponent() {
+ return lowercase pending function declaration
;
+}
+function errorComponent() {
+ return lowercase error function declaration
;
+}
+export { component };
+export { pendingComponent };
+export { errorComponent };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration@loader.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration@loader.tsx
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration@shared.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/2-components-combined-loader-separate/lowercase-function-declaration@shared.tsx
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration.tsx
new file mode 100644
index 0000000000..574c6d4c2b
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration.tsx
@@ -0,0 +1,10 @@
+const $$splitErrorComponentImporter = () => import('lowercase-function-declaration.tsx?tsr-split=errorComponent');
+const $$splitPendingComponentImporter = () => import('lowercase-function-declaration.tsx?tsr-split=component---loader---notFoundComponent---pendingComponent');
+const $$splitComponentImporter = () => import('lowercase-function-declaration.tsx?tsr-split=component---loader---notFoundComponent---pendingComponent');
+import { lazyRouteComponent } from '@tanstack/react-router';
+import { createFileRoute } from '@tanstack/react-router';
+export const Route = createFileRoute('/')({
+ component: lazyRouteComponent($$splitComponentImporter, 'component'),
+ pendingComponent: lazyRouteComponent($$splitPendingComponentImporter, 'pendingComponent'),
+ errorComponent: lazyRouteComponent($$splitErrorComponentImporter, 'errorComponent')
+});
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration@component---loader---notFoundComponent---pendingComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration@component---loader---notFoundComponent---pendingComponent.tsx
new file mode 100644
index 0000000000..382621ea9a
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration@component---loader---notFoundComponent---pendingComponent.tsx
@@ -0,0 +1,8 @@
+function component() {
+ return lowercase function declaration
;
+}
+function pendingComponent() {
+ return lowercase pending function declaration
;
+}
+export { component };
+export { pendingComponent };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration@errorComponent.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration@errorComponent.tsx
new file mode 100644
index 0000000000..acc1c0be8d
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration@errorComponent.tsx
@@ -0,0 +1,4 @@
+function errorComponent() {
+ return lowercase error function declaration
;
+}
+export { errorComponent };
\ No newline at end of file
diff --git a/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration@shared.tsx b/packages/router-plugin/tests/code-splitter/snapshots/react/3-all-combined-errorComponent-separate/lowercase-function-declaration@shared.tsx
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/packages/router-plugin/tests/code-splitter/test-files/react/lowercase-function-declaration.tsx b/packages/router-plugin/tests/code-splitter/test-files/react/lowercase-function-declaration.tsx
new file mode 100644
index 0000000000..bfc37b1d6a
--- /dev/null
+++ b/packages/router-plugin/tests/code-splitter/test-files/react/lowercase-function-declaration.tsx
@@ -0,0 +1,19 @@
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/')({
+ component,
+ pendingComponent,
+ errorComponent,
+})
+
+function component() {
+ return lowercase function declaration
+}
+
+function pendingComponent() {
+ return lowercase pending function declaration
+}
+
+function errorComponent() {
+ return lowercase error function declaration
+}
diff --git a/packages/router-plugin/tests/router-plugin-context.test.ts b/packages/router-plugin/tests/router-plugin-context.test.ts
index 40664c50a8..ecb6e7e167 100644
--- a/packages/router-plugin/tests/router-plugin-context.test.ts
+++ b/packages/router-plugin/tests/router-plugin-context.test.ts
@@ -1,8 +1,9 @@
import path from 'node:path'
import * as t from '@babel/types'
-import { describe, expect, it } from 'vitest'
+import { describe, expect, it, vi } from 'vitest'
import { parseAst } from '@tanstack/router-utils'
import { createRouterCodeSplitterPlugin } from '../src/core/router-code-splitter-plugin'
+import { unpluginRouterComposedFactory } from '../src/core/router-composed-plugin'
import { createRouterHmrPlugin } from '../src/core/router-hmr-plugin'
import { createRouterPluginContext } from '../src/core/router-plugin-context'
import { normalizePath } from '../src/core/utils'
@@ -11,19 +12,30 @@ import type { UnpluginOptions, TransformResult } from 'unplugin'
const referencePluginName =
'tanstack-router:code-splitter:compile-reference-file'
+const virtualPluginName = 'tanstack-router:code-splitter:compile-virtual-file'
-function getReferencePlugin(
+function getCodeSplitterPlugin(
plugins: ReturnType,
+ pluginName: string,
): UnpluginOptions {
const pluginArray = Array.isArray(plugins) ? plugins : [plugins]
- const plugin = pluginArray.find((item) => item.name === referencePluginName)
+ const plugin = pluginArray.find((item) => item.name === pluginName)
if (!plugin) {
- throw new Error('Reference code-splitter plugin not found')
+ throw new Error(`Code-splitter plugin "${pluginName}" not found`)
}
return plugin
}
-async function configurePlugin(plugin: UnpluginOptions) {
+function getReferencePlugin(
+ plugins: ReturnType,
+) {
+ return getCodeSplitterPlugin(plugins, referencePluginName)
+}
+
+async function configurePlugin(
+ plugin: UnpluginOptions,
+ command: 'serve' | 'build' = 'serve',
+) {
const hook = plugin.vite?.configResolved
if (!hook) {
return
@@ -31,6 +43,7 @@ async function configurePlugin(plugin: UnpluginOptions) {
const config = {
root: process.cwd(),
+ command,
plugins: [{ name: referencePluginName }],
} as never
@@ -77,6 +90,87 @@ function countProgramHotDeclarations(code: string) {
}
describe('router plugin context', () => {
+ it.each([
+ { mode: 'production', production: true },
+ { mode: 'development with addHmr disabled', production: false },
+ ])(
+ 'does not run React HMR compiler plugins in $mode',
+ async ({ production }) => {
+ const routeFile = normalizePath(
+ path.join(process.cwd(), 'src/routes/lowercase.tsx'),
+ )
+ const routeCode = `
+import { createFileRoute } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/lowercase')({ component })
+
+function component() {
+ return Hello
+}
+`
+
+ const context = createRouterPluginContext()
+ context.routesByFile.set(routeFile, { routeId: '/lowercase' })
+
+ if (production) {
+ vi.stubEnv('NODE_ENV', 'production')
+ }
+
+ try {
+ const plugins = createRouterCodeSplitterPlugin(
+ {
+ target: 'react',
+ autoCodeSplitting: true,
+ codeSplittingOptions: production ? undefined : { addHmr: false },
+ },
+ context,
+ )
+ const referencePlugin = getReferencePlugin(plugins)
+ const virtualPlugin = getCodeSplitterPlugin(plugins, virtualPluginName)
+
+ await configurePlugin(referencePlugin, production ? 'build' : 'serve')
+
+ const referenceCode = getCode(
+ await transformReferenceRoute(referencePlugin, routeCode, routeFile),
+ )
+ const virtualCode = getCode(
+ await transformReferenceRoute(
+ virtualPlugin,
+ routeCode,
+ `${routeFile}?tsr-split=component`,
+ ),
+ )
+
+ expect(referenceCode).not.toContain('TSRFastRefreshAnchor')
+ expect(virtualCode).toContain('function component()')
+ expect(virtualCode).toContain('export { component }')
+ expect(virtualCode).not.toContain('SplitComponent')
+ } finally {
+ if (production) {
+ vi.unstubAllEnvs()
+ }
+ }
+ },
+ )
+
+ it('does not install the standalone route HMR plugin in production', () => {
+ vi.stubEnv('NODE_ENV', 'production')
+
+ try {
+ const plugins = unpluginRouterComposedFactory(
+ { target: 'react', autoCodeSplitting: false },
+ { framework: 'vite' },
+ )
+
+ const pluginArray = Array.isArray(plugins) ? plugins : [plugins]
+ expect(
+ pluginArray.some((plugin) => plugin.name === 'tanstack-router:hmr'),
+ ).toBe(false)
+ } finally {
+ vi.unstubAllEnvs()
+ }
+ })
+
it('keeps multiple code-splitter instances isolated by explicit context', async () => {
const routeFile = normalizePath(
path.join(process.cwd(), 'src/routes-a/owned.tsx'),
From 49bd9fa4471ad5bbc6c2e629b29de66ae43d421a Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Sun, 19 Jul 2026 16:29:16 +0200
Subject: [PATCH 003/335] ci: Version Packages (#7857)
---
.changeset/fresh-routes-refresh.md | 5 -----
examples/react/authenticated-routes-firebase/package.json | 2 +-
examples/react/authenticated-routes/package.json | 2 +-
examples/react/basic-file-based/package.json | 2 +-
examples/react/basic-react-query-file-based/package.json | 2 +-
examples/react/basic-ssr-file-based/package.json | 2 +-
.../react/basic-ssr-streaming-file-based/package.json | 2 +-
examples/react/basic-virtual-file-based/package.json | 2 +-
.../react/basic-virtual-inside-file-based/package.json | 2 +-
examples/react/i18n-paraglide/package.json | 2 +-
examples/react/kitchen-sink-file-based/package.json | 2 +-
.../kitchen-sink-react-query-file-based/package.json | 2 +-
examples/react/large-file-based/package.json | 2 +-
examples/react/quickstart-esbuild-file-based/package.json | 2 +-
examples/react/quickstart-file-based/package.json | 2 +-
examples/react/quickstart-rspack-file-based/package.json | 2 +-
examples/react/quickstart-webpack-file-based/package.json | 2 +-
examples/react/router-monorepo-react-query/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/react/router-monorepo-simple-lazy/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/react/router-monorepo-simple/package.json | 2 +-
.../router-monorepo-simple/packages/router/package.json | 2 +-
examples/react/search-validator-adapters/package.json | 2 +-
examples/react/start-bare/package.json | 2 +-
examples/react/start-basic-auth/package.json | 2 +-
examples/react/start-basic-authjs/package.json | 2 +-
examples/react/start-basic-cloudflare/package.json | 2 +-
examples/react/start-basic-react-query/package.json | 2 +-
examples/react/start-basic-static/package.json | 2 +-
examples/react/start-basic/package.json | 2 +-
examples/react/start-bun/package.json | 4 ++--
examples/react/start-clerk-basic/package.json | 2 +-
examples/react/start-convex-trellaux/package.json | 2 +-
examples/react/start-counter/package.json | 2 +-
examples/react/start-i18n-paraglide/package.json | 2 +-
examples/react/start-large/package.json | 2 +-
examples/react/start-material-ui/package.json | 2 +-
examples/react/start-rscs/package.json | 2 +-
.../package.json | 2 +-
examples/react/start-supabase-basic/package.json | 2 +-
examples/react/start-tailwind-v4/package.json | 2 +-
examples/react/start-trellaux/package.json | 2 +-
examples/react/start-workos/package.json | 2 +-
examples/react/view-transitions/package.json | 2 +-
examples/react/with-trpc-react-query/package.json | 2 +-
examples/react/with-trpc/package.json | 2 +-
examples/solid/authenticated-routes-firebase/package.json | 2 +-
examples/solid/authenticated-routes/package.json | 2 +-
examples/solid/basic-file-based/package.json | 2 +-
examples/solid/basic-solid-query-file-based/package.json | 2 +-
examples/solid/basic-solid-query/package.json | 2 +-
examples/solid/basic-ssr-file-based/package.json | 2 +-
.../solid/basic-ssr-streaming-file-based/package.json | 2 +-
examples/solid/basic-virtual-file-based/package.json | 2 +-
.../solid/basic-virtual-inside-file-based/package.json | 2 +-
examples/solid/i18n-paraglide/package.json | 2 +-
examples/solid/kitchen-sink-file-based/package.json | 2 +-
.../kitchen-sink-solid-query-file-based/package.json | 2 +-
examples/solid/large-file-based/package.json | 2 +-
examples/solid/quickstart-esbuild-file-based/package.json | 2 +-
examples/solid/quickstart-file-based/package.json | 2 +-
examples/solid/quickstart-rspack-file-based/package.json | 2 +-
examples/solid/quickstart-webpack-file-based/package.json | 2 +-
examples/solid/router-monorepo-simple-lazy/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/solid/router-monorepo-simple/package.json | 2 +-
.../router-monorepo-simple/packages/router/package.json | 2 +-
examples/solid/router-monorepo-solid-query/package.json | 2 +-
.../packages/router/package.json | 2 +-
examples/solid/search-validator-adapters/package.json | 2 +-
examples/solid/start-basic-auth/package.json | 2 +-
examples/solid/start-basic-authjs/package.json | 2 +-
examples/solid/start-basic-cloudflare/package.json | 2 +-
examples/solid/start-basic-netlify/package.json | 2 +-
examples/solid/start-basic-nitro/package.json | 2 +-
examples/solid/start-basic-solid-query/package.json | 2 +-
examples/solid/start-basic-static/package.json | 2 +-
examples/solid/start-basic/package.json | 2 +-
examples/solid/start-bun/package.json | 4 ++--
examples/solid/start-convex-better-auth/package.json | 2 +-
examples/solid/start-counter/package.json | 2 +-
examples/solid/start-i18n-paraglide/package.json | 2 +-
examples/solid/start-large/package.json | 2 +-
.../package.json | 2 +-
examples/solid/start-supabase-basic/package.json | 2 +-
examples/solid/start-tailwind-v4/package.json | 2 +-
examples/solid/view-transitions/package.json | 2 +-
examples/solid/with-trpc/package.json | 2 +-
examples/vue/basic-file-based-jsx/package.json | 2 +-
examples/vue/basic-file-based-sfc/package.json | 2 +-
packages/react-start-rsc/CHANGELOG.md | 7 +++++++
packages/react-start-rsc/package.json | 2 +-
packages/react-start/CHANGELOG.md | 8 ++++++++
packages/react-start/package.json | 2 +-
packages/router-plugin/CHANGELOG.md | 6 ++++++
packages/router-plugin/package.json | 2 +-
packages/router-vite-plugin/CHANGELOG.md | 7 +++++++
packages/router-vite-plugin/package.json | 2 +-
packages/solid-start/CHANGELOG.md | 7 +++++++
packages/solid-start/package.json | 2 +-
packages/start-plugin-core/CHANGELOG.md | 7 +++++++
packages/start-plugin-core/package.json | 2 +-
packages/vue-start/CHANGELOG.md | 7 +++++++
packages/vue-start/package.json | 2 +-
105 files changed, 148 insertions(+), 104 deletions(-)
delete mode 100644 .changeset/fresh-routes-refresh.md
diff --git a/.changeset/fresh-routes-refresh.md b/.changeset/fresh-routes-refresh.md
deleted file mode 100644
index 3c23631cd4..0000000000
--- a/.changeset/fresh-routes-refresh.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'@tanstack/router-plugin': patch
----
-
-Preserve React component state during HMR when route components are declared with lowercase function names. The development-only React transforms cover split route component groups and unsplit root route component options, including shell, pending, and error components, without changing production output.
diff --git a/examples/react/authenticated-routes-firebase/package.json b/examples/react/authenticated-routes-firebase/package.json
index c11599bf0b..b1b0b0fd54 100644
--- a/examples/react/authenticated-routes-firebase/package.json
+++ b/examples/react/authenticated-routes-firebase/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"firebase": "^11.4.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json
index 89b8f7842c..c32706b8ad 100644
--- a/examples/react/authenticated-routes/package.json
+++ b/examples/react/authenticated-routes/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json
index 68b451b310..2e335dd749 100644
--- a/examples/react/basic-file-based/package.json
+++ b/examples/react/basic-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json
index c85ea7b083..762c842956 100644
--- a/examples/react/basic-react-query-file-based/package.json
+++ b/examples/react/basic-react-query-file-based/package.json
@@ -14,7 +14,7 @@
"@tanstack/react-query-devtools": "^5.90.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json
index 20bdd7f437..2ec67334f6 100644
--- a/examples/react/basic-ssr-file-based/package.json
+++ b/examples/react/basic-ssr-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tanstack/react-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json
index de2cfab761..1c138ed636 100644
--- a/examples/react/basic-ssr-streaming-file-based/package.json
+++ b/examples/react/basic-ssr-streaming-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tanstack/react-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/react/basic-virtual-file-based/package.json b/examples/react/basic-virtual-file-based/package.json
index b2009e135a..5e8e43e9af 100644
--- a/examples/react/basic-virtual-file-based/package.json
+++ b/examples/react/basic-virtual-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/basic-virtual-inside-file-based/package.json b/examples/react/basic-virtual-inside-file-based/package.json
index 591551fd44..d53491b801 100644
--- a/examples/react/basic-virtual-inside-file-based/package.json
+++ b/examples/react/basic-virtual-inside-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/virtual-file-routes": "^1.162.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/i18n-paraglide/package.json b/examples/react/i18n-paraglide/package.json
index db9634854c..81565f3543 100644
--- a/examples/react/i18n-paraglide/package.json
+++ b/examples/react/i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json
index f256824590..3437d8efdf 100644
--- a/examples/react/kitchen-sink-file-based/package.json
+++ b/examples/react/kitchen-sink-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/kitchen-sink-react-query-file-based/package.json b/examples/react/kitchen-sink-react-query-file-based/package.json
index 62bec46301..d10164584b 100644
--- a/examples/react/kitchen-sink-react-query-file-based/package.json
+++ b/examples/react/kitchen-sink-react-query-file-based/package.json
@@ -14,7 +14,7 @@
"@tanstack/react-query-devtools": "^5.90.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"immer": "^10.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json
index 07c6eb78e3..10fc569856 100644
--- a/examples/react/large-file-based/package.json
+++ b/examples/react/large-file-based/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-esbuild-file-based/package.json b/examples/react/quickstart-esbuild-file-based/package.json
index 7e9f68e0a4..7ce6a0d7c2 100644
--- a/examples/react/quickstart-esbuild-file-based/package.json
+++ b/examples/react/quickstart-esbuild-file-based/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-file-based/package.json b/examples/react/quickstart-file-based/package.json
index ee81b51092..bc66af46cc 100644
--- a/examples/react/quickstart-file-based/package.json
+++ b/examples/react/quickstart-file-based/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json
index 8b3dc38116..263dda63d3 100644
--- a/examples/react/quickstart-rspack-file-based/package.json
+++ b/examples/react/quickstart-rspack-file-based/package.json
@@ -19,7 +19,7 @@
"devDependencies": {
"@rsbuild/core": "^2.0.11",
"@rsbuild/plugin-react": "^2.0.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"typescript": "^6.0.2"
diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json
index c352ab4a88..ce712ac9f3 100644
--- a/examples/react/quickstart-webpack-file-based/package.json
+++ b/examples/react/quickstart-webpack-file-based/package.json
@@ -14,7 +14,7 @@
},
"devDependencies": {
"@swc/core": "^1.15.33",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"html-webpack-plugin": "^5.6.3",
diff --git a/examples/react/router-monorepo-react-query/package.json b/examples/react/router-monorepo-react-query/package.json
index 913a60975b..2a9e2a606c 100644
--- a/examples/react/router-monorepo-react-query/package.json
+++ b/examples/react/router-monorepo-react-query/package.json
@@ -14,7 +14,7 @@
"@tanstack/react-query-devtools": "^5.90.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-react-query/packages/router/package.json b/examples/react/router-monorepo-react-query/packages/router/package.json
index af2fb7288c..88f21fec59 100644
--- a/examples/react/router-monorepo-react-query/packages/router/package.json
+++ b/examples/react/router-monorepo-react-query/packages/router/package.json
@@ -12,7 +12,7 @@
"@tanstack/history": "^1.162.0",
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple-lazy/package.json b/examples/react/router-monorepo-simple-lazy/package.json
index a52d7b172e..a2144b4439 100644
--- a/examples/react/router-monorepo-simple-lazy/package.json
+++ b/examples/react/router-monorepo-simple-lazy/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple-lazy/packages/router/package.json b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
index 544a7d8ce6..67cfed8cd6 100644
--- a/examples/react/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/react/router-monorepo-simple-lazy/packages/router/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/react-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/router-monorepo-simple/package.json b/examples/react/router-monorepo-simple/package.json
index 7192cfa977..95b01f06a5 100644
--- a/examples/react/router-monorepo-simple/package.json
+++ b/examples/react/router-monorepo-simple/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/router-monorepo-simple/packages/router/package.json b/examples/react/router-monorepo-simple/packages/router/package.json
index b762f00016..015d01de61 100644
--- a/examples/react/router-monorepo-simple/packages/router/package.json
+++ b/examples/react/router-monorepo-simple/packages/router/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/react-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json
index 057205072d..251d39d596 100644
--- a/examples/react/search-validator-adapters/package.json
+++ b/examples/react/search-validator-adapters/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json
index 4b408ddc2f..5a3d43e3c7 100644
--- a/examples/react/start-bare/package.json
+++ b/examples/react/start-bare/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json
index 4de0348958..e98871304e 100644
--- a/examples/react/start-basic-auth/package.json
+++ b/examples/react/start-basic-auth/package.json
@@ -16,7 +16,7 @@
"@prisma/client": "^7.0.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-authjs/package.json b/examples/react/start-basic-authjs/package.json
index f278e98af9..2d150d2a13 100644
--- a/examples/react/start-basic-authjs/package.json
+++ b/examples/react/start-basic-authjs/package.json
@@ -13,7 +13,7 @@
"@auth/core": "^0.41.1",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"start-authjs": "^1.0.0",
diff --git a/examples/react/start-basic-cloudflare/package.json b/examples/react/start-basic-cloudflare/package.json
index df280a633f..664f449996 100644
--- a/examples/react/start-basic-cloudflare/package.json
+++ b/examples/react/start-basic-cloudflare/package.json
@@ -14,7 +14,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json
index 5da0dccc61..51006733fb 100644
--- a/examples/react/start-basic-react-query/package.json
+++ b/examples/react/start-basic-react-query/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.1",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-basic-static/package.json b/examples/react/start-basic-static/package.json
index cf48965e48..9bb5be6c25 100644
--- a/examples/react/start-basic-static/package.json
+++ b/examples/react/start-basic-static/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"@tanstack/start-static-server-functions": "^1.167.19",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json
index 789d9139d5..86d047a7cf 100644
--- a/examples/react/start-basic/package.json
+++ b/examples/react/start-basic/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-bun/package.json b/examples/react/start-bun/package.json
index 38ad3bce44..c2463684e4 100644
--- a/examples/react/start-bun/package.json
+++ b/examples/react/start-bun/package.json
@@ -18,8 +18,8 @@
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.1",
- "@tanstack/react-start": "^1.168.31",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/react-start": "^1.168.32",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"tailwindcss": "^4.2.2"
diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json
index 405391cc61..3b55631b43 100644
--- a/examples/react/start-clerk-basic/package.json
+++ b/examples/react/start-clerk-basic/package.json
@@ -13,7 +13,7 @@
"@clerk/tanstack-react-start": "^0.27.14",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"@vitejs/plugin-react": "^6.0.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json
index ec8a0c2fa2..1292a1ab84 100644
--- a/examples/react/start-convex-trellaux/package.json
+++ b/examples/react/start-convex-trellaux/package.json
@@ -18,7 +18,7 @@
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.1",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"concurrently": "^8.2.2",
"convex": "^1.19.0",
"ky": "^1.7.4",
diff --git a/examples/react/start-counter/package.json b/examples/react/start-counter/package.json
index 1b47b9852b..4e47d36b1d 100644
--- a/examples/react/start-counter/package.json
+++ b/examples/react/start-counter/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
diff --git a/examples/react/start-i18n-paraglide/package.json b/examples/react/start-i18n-paraglide/package.json
index 2b90afc1a9..f4df4b1c73 100644
--- a/examples/react/start-i18n-paraglide/package.json
+++ b/examples/react/start-i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"@tanstack/react-devtools": "^0.7.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
diff --git a/examples/react/start-large/package.json b/examples/react/start-large/package.json
index f373745dcc..3a074bcdc9 100644
--- a/examples/react/start-large/package.json
+++ b/examples/react/start-large/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-query": "^5.90.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/start-material-ui/package.json b/examples/react/start-material-ui/package.json
index e528e0fb8f..ffc392e847 100644
--- a/examples/react/start-material-ui/package.json
+++ b/examples/react/start-material-ui/package.json
@@ -17,7 +17,7 @@
"@mui/material": "6.4.7",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-rscs/package.json b/examples/react/start-rscs/package.json
index 1b9a90d1f9..e27ccb6aea 100644
--- a/examples/react/start-rscs/package.json
+++ b/examples/react/start-rscs/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"dexie": "^4.0.10",
"react": "^19.2.0",
"react-dom": "^19.2.0",
diff --git a/examples/react/start-streaming-data-from-server-functions/package.json b/examples/react/start-streaming-data-from-server-functions/package.json
index c00048fd10..7f4ec5c9a6 100644
--- a/examples/react/start-streaming-data-from-server-functions/package.json
+++ b/examples/react/start-streaming-data-from-server-functions/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^4.4.3"
diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json
index c358363110..578efbab92 100644
--- a/examples/react/start-supabase-basic/package.json
+++ b/examples/react/start-supabase-basic/package.json
@@ -17,7 +17,7 @@
"@supabase/supabase-js": "^2.48.1",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1"
diff --git a/examples/react/start-tailwind-v4/package.json b/examples/react/start-tailwind-v4/package.json
index 1d370b2c8c..f032589511 100644
--- a/examples/react/start-tailwind-v4/package.json
+++ b/examples/react/start-tailwind-v4/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.6.0",
diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json
index 67a76ae325..d63357d985 100644
--- a/examples/react/start-trellaux/package.json
+++ b/examples/react/start-trellaux/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/react-router-ssr-query": "^1.167.1",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"ky": "^1.7.4",
"msw": "^2.7.0",
"react": "^19.0.0",
diff --git a/examples/react/start-workos/package.json b/examples/react/start-workos/package.json
index ec99b81c50..91f966cb78 100644
--- a/examples/react/start-workos/package.json
+++ b/examples/react/start-workos/package.json
@@ -16,7 +16,7 @@
"@radix-ui/themes": "^3.3.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/react-start": "^1.168.31",
+ "@tanstack/react-start": "^1.168.32",
"@workos/authkit-tanstack-react-start": "^0.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
diff --git a/examples/react/view-transitions/package.json b/examples/react/view-transitions/package.json
index 5ff7d5b04c..04c3a5dc81 100644
--- a/examples/react/view-transitions/package.json
+++ b/examples/react/view-transitions/package.json
@@ -12,7 +12,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redaxios": "^0.5.1",
diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json
index cae3ef999c..c230435543 100644
--- a/examples/react/with-trpc-react-query/package.json
+++ b/examples/react/with-trpc-react-query/package.json
@@ -15,7 +15,7 @@
"@tanstack/react-query-devtools": "^5.90.0",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"@trpc/tanstack-react-query": "^11.4.3",
diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json
index 14f95fe1f3..3281bd02d4 100644
--- a/examples/react/with-trpc/package.json
+++ b/examples/react/with-trpc/package.json
@@ -13,7 +13,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/react-router": "^1.170.18",
"@tanstack/react-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@trpc/client": "^11.4.3",
"@trpc/server": "^11.4.3",
"express": "^5.2.1",
diff --git a/examples/solid/authenticated-routes-firebase/package.json b/examples/solid/authenticated-routes-firebase/package.json
index d96020f657..39cbab3677 100644
--- a/examples/solid/authenticated-routes-firebase/package.json
+++ b/examples/solid/authenticated-routes-firebase/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
"firebase": "^11.4.0",
diff --git a/examples/solid/authenticated-routes/package.json b/examples/solid/authenticated-routes/package.json
index d6991e2b8b..4b0f71d795 100644
--- a/examples/solid/authenticated-routes/package.json
+++ b/examples/solid/authenticated-routes/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/basic-file-based/package.json b/examples/solid/basic-file-based/package.json
index d3aa4ab8c3..5287319ec0 100644
--- a/examples/solid/basic-file-based/package.json
+++ b/examples/solid/basic-file-based/package.json
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"typescript": "^6.0.2",
"vite": "^8.0.14",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-solid-query-file-based/package.json b/examples/solid/basic-solid-query-file-based/package.json
index c41942917b..d2923c2d56 100644
--- a/examples/solid/basic-solid-query-file-based/package.json
+++ b/examples/solid/basic-solid-query-file-based/package.json
@@ -21,7 +21,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"typescript": "^6.0.2",
"vite": "^8.0.14",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-solid-query/package.json b/examples/solid/basic-solid-query/package.json
index 756747e412..b344e5778e 100644
--- a/examples/solid/basic-solid-query/package.json
+++ b/examples/solid/basic-solid-query/package.json
@@ -19,7 +19,7 @@
"tailwindcss": "^4.2.2"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"typescript": "^6.0.2",
"vite": "^8.0.14",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/basic-ssr-file-based/package.json b/examples/solid/basic-ssr-file-based/package.json
index 22058c1745..53cbc0b6eb 100644
--- a/examples/solid/basic-ssr-file-based/package.json
+++ b/examples/solid/basic-ssr-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"compression": "^1.8.0",
"express": "^5.2.1",
"get-port": "^7.1.0",
diff --git a/examples/solid/basic-ssr-streaming-file-based/package.json b/examples/solid/basic-ssr-streaming-file-based/package.json
index 51d14f543e..e991502566 100644
--- a/examples/solid/basic-ssr-streaming-file-based/package.json
+++ b/examples/solid/basic-ssr-streaming-file-based/package.json
@@ -24,7 +24,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@types/express": "^5.0.6",
"typescript": "^6.0.2",
"vite": "^8.0.14",
diff --git a/examples/solid/basic-virtual-file-based/package.json b/examples/solid/basic-virtual-file-based/package.json
index dfcd178efe..e735eec2f4 100644
--- a/examples/solid/basic-virtual-file-based/package.json
+++ b/examples/solid/basic-virtual-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/virtual-file-routes": "^1.162.0",
diff --git a/examples/solid/basic-virtual-inside-file-based/package.json b/examples/solid/basic-virtual-inside-file-based/package.json
index d590916c05..b5f149c152 100644
--- a/examples/solid/basic-virtual-inside-file-based/package.json
+++ b/examples/solid/basic-virtual-inside-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/virtual-file-routes": "^1.162.0",
diff --git a/examples/solid/i18n-paraglide/package.json b/examples/solid/i18n-paraglide/package.json
index bfec40a2ec..b10932c863 100644
--- a/examples/solid/i18n-paraglide/package.json
+++ b/examples/solid/i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/kitchen-sink-file-based/package.json b/examples/solid/kitchen-sink-file-based/package.json
index 6c57a27ab6..953c3432a5 100644
--- a/examples/solid/kitchen-sink-file-based/package.json
+++ b/examples/solid/kitchen-sink-file-based/package.json
@@ -19,7 +19,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"typescript": "^6.0.2",
"vite": "^8.0.14",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/kitchen-sink-solid-query-file-based/package.json b/examples/solid/kitchen-sink-solid-query-file-based/package.json
index e10ead122b..07e59de122 100644
--- a/examples/solid/kitchen-sink-solid-query-file-based/package.json
+++ b/examples/solid/kitchen-sink-solid-query-file-based/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-query-devtools": "^5.90.0",
"@tanstack/solid-router": "^1.170.18",
diff --git a/examples/solid/large-file-based/package.json b/examples/solid/large-file-based/package.json
index a1d240c37e..cb5e474a03 100644
--- a/examples/solid/large-file-based/package.json
+++ b/examples/solid/large-file-based/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
diff --git a/examples/solid/quickstart-esbuild-file-based/package.json b/examples/solid/quickstart-esbuild-file-based/package.json
index 8849f4a443..118afd0bab 100644
--- a/examples/solid/quickstart-esbuild-file-based/package.json
+++ b/examples/solid/quickstart-esbuild-file-based/package.json
@@ -9,7 +9,7 @@
"start": "dev"
},
"dependencies": {
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/quickstart-file-based/package.json b/examples/solid/quickstart-file-based/package.json
index c2308fcf0c..4792ee2010 100644
--- a/examples/solid/quickstart-file-based/package.json
+++ b/examples/solid/quickstart-file-based/package.json
@@ -18,7 +18,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"typescript": "^6.0.2",
"vite": "^8.0.14",
"vite-plugin-solid": "^2.11.11"
diff --git a/examples/solid/quickstart-rspack-file-based/package.json b/examples/solid/quickstart-rspack-file-based/package.json
index 0290e9c77d..df94063b32 100644
--- a/examples/solid/quickstart-rspack-file-based/package.json
+++ b/examples/solid/quickstart-rspack-file-based/package.json
@@ -19,7 +19,7 @@
"@rsbuild/core": "^2.0.11",
"@rsbuild/plugin-babel": "^1.1.2",
"@rsbuild/plugin-solid": "^1.1.1",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"typescript": "^6.0.2"
}
}
diff --git a/examples/solid/quickstart-webpack-file-based/package.json b/examples/solid/quickstart-webpack-file-based/package.json
index a519e80916..661a7ceece 100644
--- a/examples/solid/quickstart-webpack-file-based/package.json
+++ b/examples/solid/quickstart-webpack-file-based/package.json
@@ -15,7 +15,7 @@
"devDependencies": {
"@babel/core": "^7.28.5",
"@babel/preset-typescript": "^7.27.1",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"babel-loader": "^10.0.0",
"babel-preset-solid": "^1.9.10",
"css-loader": "^7.1.2",
diff --git a/examples/solid/router-monorepo-simple-lazy/package.json b/examples/solid/router-monorepo-simple-lazy/package.json
index 130b94021e..8bae80e6c3 100644
--- a/examples/solid/router-monorepo-simple-lazy/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
index f102e265cc..f2b477f0a0 100644
--- a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/solid-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-simple/package.json b/examples/solid/router-monorepo-simple/package.json
index 494e9fb7f6..d45c47b06a 100644
--- a/examples/solid/router-monorepo-simple/package.json
+++ b/examples/solid/router-monorepo-simple/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-simple/packages/router/package.json b/examples/solid/router-monorepo-simple/packages/router/package.json
index afbb05b627..9df7595ae8 100644
--- a/examples/solid/router-monorepo-simple/packages/router/package.json
+++ b/examples/solid/router-monorepo-simple/packages/router/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"@tanstack/history": "^1.162.0",
"@tanstack/solid-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
"solid-js": "^1.9.10"
diff --git a/examples/solid/router-monorepo-solid-query/package.json b/examples/solid/router-monorepo-solid-query/package.json
index 63ab851a79..82be9960af 100644
--- a/examples/solid/router-monorepo-solid-query/package.json
+++ b/examples/solid/router-monorepo-solid-query/package.json
@@ -14,7 +14,7 @@
"@tanstack/solid-query-devtools": "^5.90.0",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"solid-js": "^1.9.10",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/router-monorepo-solid-query/packages/router/package.json b/examples/solid/router-monorepo-solid-query/packages/router/package.json
index 0b0212a2d9..5511587ac4 100644
--- a/examples/solid/router-monorepo-solid-query/packages/router/package.json
+++ b/examples/solid/router-monorepo-solid-query/packages/router/package.json
@@ -11,7 +11,7 @@
"@tanstack/history": "^1.162.0",
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-router": "^1.170.18",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@router-solid-mono-solid-query/post-query": "workspace:*",
"redaxios": "^0.5.1",
"zod": "^4.4.3",
diff --git a/examples/solid/search-validator-adapters/package.json b/examples/solid/search-validator-adapters/package.json
index 3c2f179f5d..3c63435630 100644
--- a/examples/solid/search-validator-adapters/package.json
+++ b/examples/solid/search-validator-adapters/package.json
@@ -15,7 +15,7 @@
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/valibot-adapter": "^1.167.0",
"@tanstack/zod-adapter": "^1.167.0",
"arktype": "^2.1.7",
diff --git a/examples/solid/start-basic-auth/package.json b/examples/solid/start-basic-auth/package.json
index 4153fa4418..1cf7e6ca8e 100644
--- a/examples/solid/start-basic-auth/package.json
+++ b/examples/solid/start-basic-auth/package.json
@@ -16,7 +16,7 @@
"@prisma/client": "^7.0.0",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-authjs/package.json b/examples/solid/start-basic-authjs/package.json
index e530b96fcb..20dfc7b4c8 100644
--- a/examples/solid/start-basic-authjs/package.json
+++ b/examples/solid/start-basic-authjs/package.json
@@ -13,7 +13,7 @@
"@auth/core": "^0.41.1",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"solid-js": "^1.9.10",
"start-authjs": "^1.0.0",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-cloudflare/package.json b/examples/solid/start-basic-cloudflare/package.json
index 37301e7006..61ec997672 100644
--- a/examples/solid/start-basic-cloudflare/package.json
+++ b/examples/solid/start-basic-cloudflare/package.json
@@ -14,7 +14,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-netlify/package.json b/examples/solid/start-basic-netlify/package.json
index 26843023e5..300731993a 100644
--- a/examples/solid/start-basic-netlify/package.json
+++ b/examples/solid/start-basic-netlify/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-nitro/package.json b/examples/solid/start-basic-nitro/package.json
index d852359c69..eb242e0cdc 100644
--- a/examples/solid/start-basic-nitro/package.json
+++ b/examples/solid/start-basic-nitro/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-basic-solid-query/package.json b/examples/solid/start-basic-solid-query/package.json
index fdd069531a..2ed9b408a0 100644
--- a/examples/solid/start-basic-solid-query/package.json
+++ b/examples/solid/start-basic-solid-query/package.json
@@ -15,7 +15,7 @@
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-router-ssr-query": "^1.167.1",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-basic-static/package.json b/examples/solid/start-basic-static/package.json
index a8bb95890f..e378294c01 100644
--- a/examples/solid/start-basic-static/package.json
+++ b/examples/solid/start-basic-static/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"@tanstack/start-static-server-functions": "^1.167.19",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
diff --git a/examples/solid/start-basic/package.json b/examples/solid/start-basic/package.json
index 4970f83523..2edd8c3478 100644
--- a/examples/solid/start-basic/package.json
+++ b/examples/solid/start-basic/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0"
diff --git a/examples/solid/start-bun/package.json b/examples/solid/start-bun/package.json
index 84736bc627..c04beb9bd4 100644
--- a/examples/solid/start-bun/package.json
+++ b/examples/solid/start-bun/package.json
@@ -18,8 +18,8 @@
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
"@tanstack/solid-router-ssr-query": "^1.167.1",
- "@tanstack/solid-start": "^1.168.31",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/solid-start": "^1.168.32",
+ "@tanstack/router-plugin": "^1.168.23",
"solid-js": "^1.9.10",
"tailwindcss": "^4.2.2"
},
diff --git a/examples/solid/start-convex-better-auth/package.json b/examples/solid/start-convex-better-auth/package.json
index 96ecf8b933..7d0d3b748c 100644
--- a/examples/solid/start-convex-better-auth/package.json
+++ b/examples/solid/start-convex-better-auth/package.json
@@ -15,7 +15,7 @@
"@tailwindcss/vite": "^4.2.2",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"better-auth": "^1.6.19",
"clsx": "^2.1.1",
"convex": "^1.28.2",
diff --git a/examples/solid/start-counter/package.json b/examples/solid/start-counter/package.json
index 375cdd1a0d..55f0def296 100644
--- a/examples/solid/start-counter/package.json
+++ b/examples/solid/start-counter/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
diff --git a/examples/solid/start-i18n-paraglide/package.json b/examples/solid/start-i18n-paraglide/package.json
index 601677de98..afa9366193 100644
--- a/examples/solid/start-i18n-paraglide/package.json
+++ b/examples/solid/start-i18n-paraglide/package.json
@@ -12,7 +12,7 @@
"@tanstack/solid-devtools": "^0.7.0",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"solid-js": "^1.9.10"
},
"devDependencies": {
diff --git a/examples/solid/start-large/package.json b/examples/solid/start-large/package.json
index 882312e4ac..f5e06de43e 100644
--- a/examples/solid/start-large/package.json
+++ b/examples/solid/start-large/package.json
@@ -15,7 +15,7 @@
"@tanstack/solid-query": "^5.90.9",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"redaxios": "^0.5.1",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
diff --git a/examples/solid/start-streaming-data-from-server-functions/package.json b/examples/solid/start-streaming-data-from-server-functions/package.json
index 55245c5e12..c72208a3f3 100644
--- a/examples/solid/start-streaming-data-from-server-functions/package.json
+++ b/examples/solid/start-streaming-data-from-server-functions/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"solid-js": "^1.9.10",
"zod": "^4.4.3"
},
diff --git a/examples/solid/start-supabase-basic/package.json b/examples/solid/start-supabase-basic/package.json
index 6c54d45673..3e8c7c063a 100644
--- a/examples/solid/start-supabase-basic/package.json
+++ b/examples/solid/start-supabase-basic/package.json
@@ -16,7 +16,7 @@
"@supabase/supabase-js": "^2.48.1",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"solid-js": "^1.9.9",
"redaxios": "^0.5.1"
},
diff --git a/examples/solid/start-tailwind-v4/package.json b/examples/solid/start-tailwind-v4/package.json
index ce261b3ff7..323ff0ecaf 100644
--- a/examples/solid/start-tailwind-v4/package.json
+++ b/examples/solid/start-tailwind-v4/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
- "@tanstack/solid-start": "^1.168.31",
+ "@tanstack/solid-start": "^1.168.32",
"solid-js": "^1.9.10",
"tailwind-merge": "^3.6.0",
"zod": "^4.4.3"
diff --git a/examples/solid/view-transitions/package.json b/examples/solid/view-transitions/package.json
index 87fb50ffd3..0ea0691e97 100644
--- a/examples/solid/view-transitions/package.json
+++ b/examples/solid/view-transitions/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/examples/solid/with-trpc/package.json b/examples/solid/with-trpc/package.json
index 3ea2028de1..9bcca25387 100644
--- a/examples/solid/with-trpc/package.json
+++ b/examples/solid/with-trpc/package.json
@@ -11,7 +11,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/solid-router": "^1.170.18",
"@tanstack/solid-router-devtools": "^1.167.0",
"@trpc/client": "^11.4.3",
diff --git a/examples/vue/basic-file-based-jsx/package.json b/examples/vue/basic-file-based-jsx/package.json
index 147ff341ee..d2de76f46f 100644
--- a/examples/vue/basic-file-based-jsx/package.json
+++ b/examples/vue/basic-file-based-jsx/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/vue-router": "^1.170.17",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/examples/vue/basic-file-based-sfc/package.json b/examples/vue/basic-file-based-sfc/package.json
index 9f6eda684e..3fba023a59 100644
--- a/examples/vue/basic-file-based-sfc/package.json
+++ b/examples/vue/basic-file-based-sfc/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tailwindcss/vite": "^4.2.2",
- "@tanstack/router-plugin": "^1.168.22",
+ "@tanstack/router-plugin": "^1.168.23",
"@tanstack/vue-router": "^1.170.17",
"@tanstack/vue-router-devtools": "^1.167.0",
"redaxios": "^0.5.1",
diff --git a/packages/react-start-rsc/CHANGELOG.md b/packages/react-start-rsc/CHANGELOG.md
index 3178fb4940..4a84a4e80d 100644
--- a/packages/react-start-rsc/CHANGELOG.md
+++ b/packages/react-start-rsc/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/react-start-rsc
+## 0.1.31
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/start-plugin-core@1.171.24
+
## 0.1.30
### Patch Changes
diff --git a/packages/react-start-rsc/package.json b/packages/react-start-rsc/package.json
index 44a3f16c6b..3bb45bd6c4 100644
--- a/packages/react-start-rsc/package.json
+++ b/packages/react-start-rsc/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start-rsc",
- "version": "0.1.30",
+ "version": "0.1.31",
"description": "React Server Components support for TanStack Start",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/react-start/CHANGELOG.md b/packages/react-start/CHANGELOG.md
index e63bb1209e..4ade979ee4 100644
--- a/packages/react-start/CHANGELOG.md
+++ b/packages/react-start/CHANGELOG.md
@@ -1,5 +1,13 @@
# @tanstack/react-start
+## 1.168.32
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/start-plugin-core@1.171.24
+ - @tanstack/react-start-rsc@0.1.31
+
## 1.168.31
### Patch Changes
diff --git a/packages/react-start/package.json b/packages/react-start/package.json
index 24a7c5b58d..954c64597e 100644
--- a/packages/react-start/package.json
+++ b/packages/react-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-start",
- "version": "1.168.31",
+ "version": "1.168.32",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-plugin/CHANGELOG.md b/packages/router-plugin/CHANGELOG.md
index 3cbf45a5dc..ba440a0ff0 100644
--- a/packages/router-plugin/CHANGELOG.md
+++ b/packages/router-plugin/CHANGELOG.md
@@ -1,5 +1,11 @@
# @tanstack/router-plugin
+## 1.168.23
+
+### Patch Changes
+
+- [#7855](https://github.com/TanStack/router/pull/7855) [`49f6863`](https://github.com/TanStack/router/commit/49f686324574ea65851317cbba084eb386a911c6) - Preserve React component state during HMR when route components are declared with lowercase function names. The development-only React transforms cover split route component groups and unsplit root route component options, including shell, pending, and error components, without changing production output.
+
## 1.168.22
### Patch Changes
diff --git a/packages/router-plugin/package.json b/packages/router-plugin/package.json
index 36a92be67b..dfefe55a45 100644
--- a/packages/router-plugin/package.json
+++ b/packages/router-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-plugin",
- "version": "1.168.22",
+ "version": "1.168.23",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/router-vite-plugin/CHANGELOG.md b/packages/router-vite-plugin/CHANGELOG.md
index 79eb4fb014..2cbfc55ef4 100644
--- a/packages/router-vite-plugin/CHANGELOG.md
+++ b/packages/router-vite-plugin/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/router-vite-plugin
+## 1.167.23
+
+### Patch Changes
+
+- Updated dependencies [[`49f6863`](https://github.com/TanStack/router/commit/49f686324574ea65851317cbba084eb386a911c6)]:
+ - @tanstack/router-plugin@1.168.23
+
## 1.167.22
### Patch Changes
diff --git a/packages/router-vite-plugin/package.json b/packages/router-vite-plugin/package.json
index c6f3ef2b77..5fa57a8cc2 100644
--- a/packages/router-vite-plugin/package.json
+++ b/packages/router-vite-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/router-vite-plugin",
- "version": "1.167.22",
+ "version": "1.167.23",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/solid-start/CHANGELOG.md b/packages/solid-start/CHANGELOG.md
index 218f86a421..8a43a6c5f9 100644
--- a/packages/solid-start/CHANGELOG.md
+++ b/packages/solid-start/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/solid-start
+## 1.168.32
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/start-plugin-core@1.171.24
+
## 1.168.31
### Patch Changes
diff --git a/packages/solid-start/package.json b/packages/solid-start/package.json
index 70b265ae94..2a8c1dafc2 100644
--- a/packages/solid-start/package.json
+++ b/packages/solid-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-start",
- "version": "1.168.31",
+ "version": "1.168.32",
"description": "Modern and scalable routing for Solid applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/start-plugin-core/CHANGELOG.md b/packages/start-plugin-core/CHANGELOG.md
index 6fb57bccc7..3cc5088ed3 100644
--- a/packages/start-plugin-core/CHANGELOG.md
+++ b/packages/start-plugin-core/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/start-plugin-core
+## 1.171.24
+
+### Patch Changes
+
+- Updated dependencies [[`49f6863`](https://github.com/TanStack/router/commit/49f686324574ea65851317cbba084eb386a911c6)]:
+ - @tanstack/router-plugin@1.168.23
+
## 1.171.23
### Patch Changes
diff --git a/packages/start-plugin-core/package.json b/packages/start-plugin-core/package.json
index 8479116586..30f2e700e0 100644
--- a/packages/start-plugin-core/package.json
+++ b/packages/start-plugin-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/start-plugin-core",
- "version": "1.171.23",
+ "version": "1.171.24",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
diff --git a/packages/vue-start/CHANGELOG.md b/packages/vue-start/CHANGELOG.md
index eb1db3fd04..dd4a7e7233 100644
--- a/packages/vue-start/CHANGELOG.md
+++ b/packages/vue-start/CHANGELOG.md
@@ -1,5 +1,12 @@
# @tanstack/vue-start
+## 1.168.31
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @tanstack/start-plugin-core@1.171.24
+
## 1.168.30
### Patch Changes
diff --git a/packages/vue-start/package.json b/packages/vue-start/package.json
index 10215ef5d9..9c9c59b245 100644
--- a/packages/vue-start/package.json
+++ b/packages/vue-start/package.json
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-start",
- "version": "1.168.30",
+ "version": "1.168.31",
"description": "Modern and scalable routing for Vue applications",
"author": "Tanner Linsley",
"license": "MIT",
From edf55759d8e9e5e7954945fdda2ee81c48e8c713 Mon Sep 17 00:00:00 2001
From: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
Date: Sun, 19 Jul 2026 22:34:06 +0200
Subject: [PATCH 004/335] ci: omit unchanged bundle size scenarios (#7856)
---
benchmarks/bundle-size/package.json | 11 +-
scripts/benchmarks/bundle-size/pr-report.mjs | 64 ++++++---
.../benchmarks/bundle-size/pr-report.test.mjs | 131 ++++++++++++++++++
3 files changed, 184 insertions(+), 22 deletions(-)
create mode 100644 scripts/benchmarks/bundle-size/pr-report.test.mjs
diff --git a/benchmarks/bundle-size/package.json b/benchmarks/bundle-size/package.json
index 8cd8f73f41..65d8d7483b 100644
--- a/benchmarks/bundle-size/package.json
+++ b/benchmarks/bundle-size/package.json
@@ -3,7 +3,8 @@
"private": true,
"type": "module",
"scripts": {
- "build": "node ../../scripts/benchmarks/bundle-size/measure.mjs --skip-package-builds"
+ "build": "node ../../scripts/benchmarks/bundle-size/measure.mjs --skip-package-builds",
+ "test:unit": "node --test ../../scripts/benchmarks/bundle-size/pr-report.test.mjs"
},
"nx": {
"targets": {
@@ -23,6 +24,14 @@
"target": "build"
}
]
+ },
+ "test:unit": {
+ "inputs": [
+ "default",
+ "^production",
+ "{workspaceRoot}/scripts/benchmarks/bundle-size/pr-report.mjs",
+ "{workspaceRoot}/scripts/benchmarks/bundle-size/pr-report.test.mjs"
+ ]
}
}
},
diff --git a/scripts/benchmarks/bundle-size/pr-report.mjs b/scripts/benchmarks/bundle-size/pr-report.mjs
index 5118d877ec..8c58563230 100644
--- a/scripts/benchmarks/bundle-size/pr-report.mjs
+++ b/scripts/benchmarks/bundle-size/pr-report.mjs
@@ -268,10 +268,16 @@ async function main() {
? resolveBaselineFromCurrentJson(baselineCurrent)
: resolveBaselineFromHistory(historyEntries, args.baseSha)
+ const metrics = current.metrics || []
const rows = []
- for (const metric of current.metrics || []) {
+ for (const metric of metrics) {
const baselineValue = baseline.benchesByName.get(metric.id)
+
+ if (Number.isFinite(baselineValue) && metric.gzipBytes === baselineValue) {
+ continue
+ }
+
const historySeries = (seriesByScenario.get(metric.id) || []).slice(
// Reserve one slot for the current metric so the sparkline stays at trendPoints.
-args.trendPoints + 1,
@@ -290,6 +296,7 @@ async function main() {
raw: metric.rawBytes,
brotli: metric.brotliBytes,
initial: metric.initialGzipBytes,
+ hasBaseline: Number.isFinite(baselineValue),
deltaCell: formatDelta(metric.gzipBytes, baselineValue),
trendCell: sparkline(historySeries.slice(-args.trendPoints)),
})
@@ -299,31 +306,46 @@ async function main() {
lines.push(args.marker)
lines.push('## Bundle Size Benchmarks')
lines.push('')
- lines.push(`- Commit: \`${formatShortSha(current.sha)}\``)
- lines.push(
- `- Measured at: \`${current.measuredAt || current.generatedAt || 'unknown'}\``,
- )
- lines.push(`- Baseline source: \`${baseline.source}\``)
- if (args.dashboardUrl) {
- lines.push(`- Dashboard: [bundle-size history](${args.dashboardUrl})`)
- }
- lines.push('')
- lines.push(
- '| Scenario | Current (gzip) | Delta vs baseline | Initial gzip | Raw | Brotli | Trend |',
- )
- lines.push('| --- | ---: | ---: | ---: | ---: | ---: | --- |')
- for (const row of rows) {
+ if (metrics.length > 0 && rows.length === 0) {
lines.push(
- `| \`${row.id}\` | ${formatBytes(row.current)} | ${row.deltaCell} | ${formatBytes(row.initial)} | ${formatBytes(row.raw)} | ${formatBytes(row.brotli)} | ${row.trendCell} |`,
+ 'This pull request does not affect bundle size in any measured scenario.',
+ )
+ } else if (metrics.length === 0) {
+ lines.push('No bundle-size scenarios were measured.')
+ } else {
+ lines.push(`- Commit: \`${formatShortSha(current.sha)}\``)
+ lines.push(
+ `- Measured at: \`${current.measuredAt || current.generatedAt || 'unknown'}\``,
+ )
+ lines.push(`- Baseline source: \`${baseline.source}\``)
+ if (args.dashboardUrl) {
+ lines.push(`- Dashboard: [bundle-size history](${args.dashboardUrl})`)
+ }
+ lines.push('')
+ lines.push(
+ rows.some((row) => !row.hasBaseline)
+ ? 'The following scenarios have bundle-size changes or lack baseline data for comparison:'
+ : 'The following scenarios have bundle-size changes compared with the baseline:',
+ )
+ lines.push('')
+ lines.push(
+ '| Scenario | Current (gzip) | Delta vs baseline | Initial gzip | Raw | Brotli | Trend |',
+ )
+ lines.push('| --- | ---: | ---: | ---: | ---: | ---: | --- |')
+
+ for (const row of rows) {
+ lines.push(
+ `| \`${row.id}\` | ${formatBytes(row.current)} | ${row.deltaCell} | ${formatBytes(row.initial)} | ${formatBytes(row.raw)} | ${formatBytes(row.brotli)} | ${row.trendCell} |`,
+ )
+ }
+
+ lines.push('')
+ lines.push(
+ '_Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better._',
)
}
- lines.push('')
- lines.push(
- '_Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better._',
- )
-
const markdown = lines.join('\n') + '\n'
await fsp.mkdir(path.dirname(outputPath), { recursive: true })
await fsp.writeFile(outputPath, markdown, 'utf8')
diff --git a/scripts/benchmarks/bundle-size/pr-report.test.mjs b/scripts/benchmarks/bundle-size/pr-report.test.mjs
new file mode 100644
index 0000000000..f70081452d
--- /dev/null
+++ b/scripts/benchmarks/bundle-size/pr-report.test.mjs
@@ -0,0 +1,131 @@
+import assert from 'node:assert/strict'
+import { execFile } from 'node:child_process'
+import { promises as fs } from 'node:fs'
+import os from 'node:os'
+import path from 'node:path'
+import { promisify } from 'node:util'
+import test from 'node:test'
+
+const execFileAsync = promisify(execFile)
+const reportScript = new URL('./pr-report.mjs', import.meta.url)
+
+function metric(id, gzipBytes) {
+ return {
+ id,
+ gzipBytes,
+ rawBytes: gzipBytes * 3,
+ brotliBytes: gzipBytes - 100,
+ initialGzipBytes: gzipBytes - 10,
+ }
+}
+
+async function generateReport({ current, baseline, history, baseSha }) {
+ const fixtureDir = await fs.mkdtemp(
+ path.join(os.tmpdir(), 'bundle-size-pr-report-'),
+ )
+
+ try {
+ const currentPath = path.join(fixtureDir, 'current.json')
+ const outputPath = path.join(fixtureDir, 'report.md')
+ const args = [
+ reportScript.pathname,
+ '--current',
+ currentPath,
+ '--output',
+ outputPath,
+ ]
+
+ await fs.writeFile(currentPath, JSON.stringify(current))
+
+ if (baseline) {
+ const baselinePath = path.join(fixtureDir, 'baseline.json')
+ await fs.writeFile(baselinePath, JSON.stringify(baseline))
+ args.push('--baseline', baselinePath)
+ }
+
+ if (history) {
+ const historyPath = path.join(fixtureDir, 'history.json')
+ await fs.writeFile(historyPath, JSON.stringify(history))
+ args.push('--history', historyPath)
+ }
+
+ if (baseSha) {
+ args.push('--base-sha', baseSha)
+ }
+
+ await execFileAsync(process.execPath, args)
+ return await fs.readFile(outputPath, 'utf8')
+ } finally {
+ await fs.rm(fixtureDir, { recursive: true, force: true })
+ }
+}
+
+function currentJson(metrics) {
+ return {
+ benchmarkName: 'Bundle Size (gzip)',
+ measuredAt: '2026-07-19T09:45:56.787Z',
+ sha: '126aa13f296b1234',
+ metrics,
+ }
+}
+
+test('renders a concise message when no measured scenario changed', async () => {
+ const current = currentJson([metric('react-router.minimal', 1_000)])
+ const report = await generateReport({ current, baseline: current })
+
+ assert.equal(
+ report,
+ '\n## Bundle Size Benchmarks\n\nThis pull request does not affect bundle size in any measured scenario.\n',
+ )
+})
+
+test('renders only scenarios that changed against the historical baseline', async () => {
+ const current = currentJson([
+ metric('react-router.minimal', 1_000),
+ metric('react-router.full', 1_200),
+ ])
+ const history = {
+ entries: {
+ [current.benchmarkName]: [
+ {
+ commit: { id: 'baseline-sha' },
+ benches: [
+ { name: 'react-router.minimal', value: 1_000 },
+ { name: 'react-router.full', value: 1_100 },
+ ],
+ },
+ ],
+ },
+ }
+ const report = await generateReport({
+ current,
+ history,
+ baseSha: 'baseline-sha',
+ })
+
+ assert.match(
+ report,
+ /The following scenarios have bundle-size changes compared with the baseline:/,
+ )
+ assert.doesNotMatch(report, /`react-router\.minimal`/)
+ assert.match(
+ report,
+ /\| `react-router\.full` \| 1\.17 KiB \| \+100 B \(\+9\.09%\) \|/,
+ )
+})
+
+test('keeps scenarios that do not have baseline data visible', async () => {
+ const current = currentJson([
+ metric('react-router.minimal', 1_000),
+ metric('new-scenario', 900),
+ ])
+ const baseline = currentJson([metric('react-router.minimal', 1_000)])
+ const report = await generateReport({ current, baseline })
+
+ assert.match(
+ report,
+ /The following scenarios have bundle-size changes or lack baseline data for comparison:/,
+ )
+ assert.doesNotMatch(report, /`react-router\.minimal`/)
+ assert.match(report, /\| `new-scenario` \| 900 B \| n\/a \|/)
+})
From 07ce90304dde21ac5304369752bcdb2573fcc55e Mon Sep 17 00:00:00 2001
From: Zakher Masri <46135573+zaaakher@users.noreply.github.com>
Date: Tue, 21 Jul 2026 21:45:50 +0300
Subject: [PATCH 005/335] docs: remove stray semicolon in i18n page (#7870)
fix: remove stray semicolon
---
docs/router/guide/internationalization-i18n.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/router/guide/internationalization-i18n.md b/docs/router/guide/internationalization-i18n.md
index f6fd04087e..d5147ba6bf 100644
--- a/docs/router/guide/internationalization-i18n.md
+++ b/docs/router/guide/internationalization-i18n.md
@@ -187,7 +187,8 @@ export default {
```tsx
import { getLocale } from '../paraglide/runtime'
-;
+
+
```
---
From 21a859795208d52ce69147e3a6ed3a3c33b1f8bd Mon Sep 17 00:00:00 2001
From: Cong-Cong Pan
Date: Thu, 23 Jul 2026 04:09:03 +0800
Subject: [PATCH 006/335] chore: add React Start basic Rsbuild example (#7729)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
---
.../router/guide/internationalization-i18n.md | 3 +-
docs/start/framework/react/getting-started.md | 1 +
.../.devcontainer/devcontainer.json | 3 +
examples/react/start-basic-rsbuild/.gitignore | 19 +
.../react/start-basic-rsbuild/.prettierignore | 4 +
.../start-basic-rsbuild/.vscode/settings.json | 11 +
examples/react/start-basic-rsbuild/README.md | 36 ++
.../react/start-basic-rsbuild/package.json | 32 ++
.../public/android-chrome-192x192.png | Bin 0 -> 29964 bytes
.../public/android-chrome-512x512.png | Bin 0 -> 109271 bytes
.../public/apple-touch-icon.png | Bin 0 -> 27246 bytes
.../public/favicon-16x16.png | Bin 0 -> 832 bytes
.../public/favicon-32x32.png | Bin 0 -> 2115 bytes
.../start-basic-rsbuild/public/favicon.ico | Bin 0 -> 15406 bytes
.../start-basic-rsbuild/public/favicon.png | Bin 0 -> 1507 bytes
.../public/site.webmanifest | 19 +
.../start-basic-rsbuild/rsbuild.config.ts | 17 +
.../src/components/DefaultCatchBoundary.tsx | 51 ++
.../src/components/NotFound.tsx | 25 +
.../src/components/PostError.tsx | 6 +
.../src/components/UserError.tsx | 6 +
.../react/start-basic-rsbuild/src/env.d.ts | 1 +
.../start-basic-rsbuild/src/routeTree.gen.ts | 447 ++++++++++++++++++
.../react/start-basic-rsbuild/src/router.tsx | 15 +
.../start-basic-rsbuild/src/routes/__root.tsx | 130 +++++
.../src/routes/_pathlessLayout.tsx | 16 +
.../routes/_pathlessLayout/_nested-layout.tsx | 34 ++
.../_nested-layout/route-a.tsx | 11 +
.../_nested-layout/route-b.tsx | 11 +
.../src/routes/api/users.$userId.ts | 31 ++
.../src/routes/api/users.ts | 63 +++
.../src/routes/customScript[.]js.ts | 15 +
.../src/routes/deferred.tsx | 62 +++
.../start-basic-rsbuild/src/routes/index.tsx | 13 +
.../src/routes/posts.$postId.tsx | 34 ++
.../src/routes/posts.index.tsx | 9 +
.../start-basic-rsbuild/src/routes/posts.tsx | 38 ++
.../src/routes/posts_.$postId.deep.tsx | 29 ++
.../src/routes/redirect.tsx | 9 +
.../src/routes/users.$userId.tsx | 45 ++
.../src/routes/users.index.tsx | 19 +
.../start-basic-rsbuild/src/routes/users.tsx | 49 ++
.../start-basic-rsbuild/src/styles/app.css | 30 ++
.../src/utils/loggingMiddleware.tsx | 41 ++
.../start-basic-rsbuild/src/utils/posts.tsx | 40 ++
.../start-basic-rsbuild/src/utils/seo.ts | 33 ++
.../start-basic-rsbuild/src/utils/users.tsx | 5 +
.../react/start-basic-rsbuild/tsconfig.json | 21 +
pnpm-lock.yaml | 281 ++++++++++-
49 files changed, 1756 insertions(+), 9 deletions(-)
create mode 100644 examples/react/start-basic-rsbuild/.devcontainer/devcontainer.json
create mode 100644 examples/react/start-basic-rsbuild/.gitignore
create mode 100644 examples/react/start-basic-rsbuild/.prettierignore
create mode 100644 examples/react/start-basic-rsbuild/.vscode/settings.json
create mode 100644 examples/react/start-basic-rsbuild/README.md
create mode 100644 examples/react/start-basic-rsbuild/package.json
create mode 100644 examples/react/start-basic-rsbuild/public/android-chrome-192x192.png
create mode 100644 examples/react/start-basic-rsbuild/public/android-chrome-512x512.png
create mode 100644 examples/react/start-basic-rsbuild/public/apple-touch-icon.png
create mode 100644 examples/react/start-basic-rsbuild/public/favicon-16x16.png
create mode 100644 examples/react/start-basic-rsbuild/public/favicon-32x32.png
create mode 100644 examples/react/start-basic-rsbuild/public/favicon.ico
create mode 100644 examples/react/start-basic-rsbuild/public/favicon.png
create mode 100644 examples/react/start-basic-rsbuild/public/site.webmanifest
create mode 100644 examples/react/start-basic-rsbuild/rsbuild.config.ts
create mode 100644 examples/react/start-basic-rsbuild/src/components/DefaultCatchBoundary.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/components/NotFound.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/components/PostError.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/components/UserError.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/env.d.ts
create mode 100644 examples/react/start-basic-rsbuild/src/routeTree.gen.ts
create mode 100644 examples/react/start-basic-rsbuild/src/router.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/__root.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/_pathlessLayout.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout/route-a.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout/route-b.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/api/users.$userId.ts
create mode 100644 examples/react/start-basic-rsbuild/src/routes/api/users.ts
create mode 100644 examples/react/start-basic-rsbuild/src/routes/customScript[.]js.ts
create mode 100644 examples/react/start-basic-rsbuild/src/routes/deferred.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/index.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/posts.$postId.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/posts.index.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/posts.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/posts_.$postId.deep.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/redirect.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/users.$userId.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/users.index.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/routes/users.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/styles/app.css
create mode 100644 examples/react/start-basic-rsbuild/src/utils/loggingMiddleware.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/utils/posts.tsx
create mode 100644 examples/react/start-basic-rsbuild/src/utils/seo.ts
create mode 100644 examples/react/start-basic-rsbuild/src/utils/users.tsx
create mode 100644 examples/react/start-basic-rsbuild/tsconfig.json
diff --git a/docs/router/guide/internationalization-i18n.md b/docs/router/guide/internationalization-i18n.md
index d5147ba6bf..f6fd04087e 100644
--- a/docs/router/guide/internationalization-i18n.md
+++ b/docs/router/guide/internationalization-i18n.md
@@ -187,8 +187,7 @@ export default {
```tsx
import { getLocale } from '../paraglide/runtime'
-
-
+;
```
---
diff --git a/docs/start/framework/react/getting-started.md b/docs/start/framework/react/getting-started.md
index 565dc4b4cf..0320fdab4e 100644
--- a/docs/start/framework/react/getting-started.md
+++ b/docs/start/framework/react/getting-started.md
@@ -39,6 +39,7 @@ To use a different example, replace `start-basic` with one of the slugs below.
#### Examples
- [Basic](https://github.com/TanStack/router/tree/main/examples/react/start-basic) (`start-basic`)
+- [Basic + Rsbuild](https://github.com/TanStack/router/tree/main/examples/react/start-basic-rsbuild) (`start-basic-rsbuild`)
- [Basic + Auth](https://github.com/TanStack/router/tree/main/examples/react/start-basic-auth) (`start-basic-auth`)
- [Counter](https://github.com/TanStack/router/tree/main/examples/react/start-counter) (`start-counter`)
- [Basic + React Query](https://github.com/TanStack/router/tree/main/examples/react/start-basic-react-query) (`start-basic-react-query`)
diff --git a/examples/react/start-basic-rsbuild/.devcontainer/devcontainer.json b/examples/react/start-basic-rsbuild/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..e5dafce188
--- /dev/null
+++ b/examples/react/start-basic-rsbuild/.devcontainer/devcontainer.json
@@ -0,0 +1,3 @@
+{
+ "image": "mcr.microsoft.com/devcontainers/typescript-node:24"
+}
diff --git a/examples/react/start-basic-rsbuild/.gitignore b/examples/react/start-basic-rsbuild/.gitignore
new file mode 100644
index 0000000000..1f189d9bc0
--- /dev/null
+++ b/examples/react/start-basic-rsbuild/.gitignore
@@ -0,0 +1,19 @@
+node_modules
+package-lock.json
+yarn.lock
+
+.DS_Store
+.cache
+.env
+.vercel
+dist
+/build/
+/api/
+/server/build
+/public/build# Sentry Config File
+.env.sentry-build-plugin
+/test-results/
+/playwright-report/
+/blob-report/
+/playwright/.cache/
+.tanstack
diff --git a/examples/react/start-basic-rsbuild/.prettierignore b/examples/react/start-basic-rsbuild/.prettierignore
new file mode 100644
index 0000000000..2be5eaa6ec
--- /dev/null
+++ b/examples/react/start-basic-rsbuild/.prettierignore
@@ -0,0 +1,4 @@
+**/build
+**/public
+pnpm-lock.yaml
+routeTree.gen.ts
\ No newline at end of file
diff --git a/examples/react/start-basic-rsbuild/.vscode/settings.json b/examples/react/start-basic-rsbuild/.vscode/settings.json
new file mode 100644
index 0000000000..00b5278e58
--- /dev/null
+++ b/examples/react/start-basic-rsbuild/.vscode/settings.json
@@ -0,0 +1,11 @@
+{
+ "files.watcherExclude": {
+ "**/routeTree.gen.ts": true
+ },
+ "search.exclude": {
+ "**/routeTree.gen.ts": true
+ },
+ "files.readonlyInclude": {
+ "**/routeTree.gen.ts": true
+ }
+}
diff --git a/examples/react/start-basic-rsbuild/README.md b/examples/react/start-basic-rsbuild/README.md
new file mode 100644
index 0000000000..64117c915b
--- /dev/null
+++ b/examples/react/start-basic-rsbuild/README.md
@@ -0,0 +1,36 @@
+# TanStack Start - Basic Rsbuild Example
+
+This is the basic TanStack Start Rsbuild example, demonstrating the fundamentals of building applications with TanStack Router and TanStack Start.
+
+- [TanStack Router Docs](https://tanstack.com/router)
+
+It's deployed automagically with Netlify!
+
+- [Netlify](https://netlify.com/)
+
+## Start a new project based on this example
+
+To start a new project based on this example, run:
+
+```sh
+npx gitpick TanStack/router/tree/main/examples/react/start-basic-rsbuild start-basic-rsbuild
+```
+
+## Getting Started
+
+From your terminal:
+
+```sh
+pnpm install
+pnpm dev
+```
+
+This starts your app in development mode, rebuilding assets on file changes.
+
+## Build
+
+To build the app for production:
+
+```sh
+pnpm build
+```
diff --git a/examples/react/start-basic-rsbuild/package.json b/examples/react/start-basic-rsbuild/package.json
new file mode 100644
index 0000000000..2bbd7496e4
--- /dev/null
+++ b/examples/react/start-basic-rsbuild/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "tanstack-start-example-basic-rsbuild",
+ "private": true,
+ "sideEffects": false,
+ "type": "module",
+ "scripts": {
+ "dev": "rsbuild dev --port 3000",
+ "build": "rsbuild build && tsc --noEmit",
+ "preview": "rsbuild preview",
+ "start": "srvx --prod -s ../client dist/server/index.js"
+ },
+ "dependencies": {
+ "@tanstack/react-router": "workspace:*",
+ "@tanstack/react-router-devtools": "workspace:^",
+ "@tanstack/react-start": "workspace:*",
+ "react": "^19.2.3",
+ "react-dom": "^19.2.3",
+ "tailwind-merge": "^3.6.0",
+ "zod": "^4.4.3"
+ },
+ "devDependencies": {
+ "@rsbuild/core": "^2.0.11",
+ "@rsbuild/plugin-react": "^2.0.0",
+ "@rsbuild/plugin-tailwindcss": "^2.0.3",
+ "@types/node": "25.0.9",
+ "@types/react": "^19.2.8",
+ "@types/react-dom": "^19.2.3",
+ "srvx": "^0.11.18",
+ "tailwindcss": "^4.2.2",
+ "typescript": "^6.0.2"
+ }
+}
diff --git a/examples/react/start-basic-rsbuild/public/android-chrome-192x192.png b/examples/react/start-basic-rsbuild/public/android-chrome-192x192.png
new file mode 100644
index 0000000000000000000000000000000000000000..09c8324f8c6781bc90fcf5dd38e0702bd5f171f3
GIT binary patch
literal 29964
zcmV(|K+(U6P)