When autoCodeSplitting is set to true in vite config, every time I change anything in a route.tsx file, entire app re-renders. If i extract the part I want to change in a separate file (so not only component but new file) then only the component itself re-renders.
Disabling the plugin makes everything work normally, ie. changing something in a route.tsx file doesn't rerender the entire app, just the part that got changed.
This is what vite outputs as being updated with autoCodeSplitting on:
[vite] hmr update /src/styles/globals.css, /src/providers/tanstack-router-provider.tsx, /src/routes/~_auth/~login/~route.tsx?tsr-split (x2)
(tanstack-router-provider.tsx is just a file where I inject the data into router context and return the tsr RouterProvider wrapper)
This is with off:
16:33:58 [vite] hmr update /src/routes/~_auth/~login/~route.tsx, /src/styles/globals.css