how to handle circular dependency breaking hmr?
I've noticed that hmr does not work properly when using server functions and react query running the start-basic-react-query example and changing anything in posts.route for example will trigger a hard refresh because of the way things get imported, running with --debug hmr produces this output
vite:hmr circular imports detected: /src/routes/posts.route.tsx -> /src/utils/posts.tsx -> /node_modules/@tanstack/react-start/dist/esm/client.js?v=0794880d -> /node_modules/@tanstack/react-start-client/dist/esm/index.js?v=0794880d -> /node_modules/@tanstack/start-client-core/dist/esm/client/index.js?v=0794880d -> /node_modules/@tanstack/start-client-core/dist/esm/client/hydrateStart.js?v=0794880d -> /src/router.tsx -> /src/routeTree.gen.ts -> /src/routes/posts.route.tsx
any suggestions on how to handle this?1 Reply
rival-black•7d ago
this is fixed in https://github.com/TanStack/router/releases/tag/v1.132.12
GitHub
Release v1.132.12 · TanStack/router
Version 1.132.12 - 9/26/25, 11:44 PM
Changes
Fix
circular imports (84537b7) by Manuel Schiller
Packages
@tanstack/solid-start@1.132.12
@tanstack/solid-start-client@1.132.12
@tanstack/start-clien...