You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HMR doesn’t work at all. Totally my fault: #2545 exports components and loaders from the same file, which breaks HMR. Those route files are all the top level files and HMR is broken for any changes below them, so it’s broken for all changes. This is annoying because it takes a few seconds to see a change instead of like 50ms, and it refreshes the page, losing any client-side state.
That change was meant to prepare us for RR v7 in framework mode + SPA mode, but I’m not sure how feasible that is for us. So we need to determine whether we plan to move to that, and if not, switch all the route files back to sticking loader on PageComponent.loader.
RRv7 in framework mode may or may not fix this. As their docs point out, the Vite plugin removes exports like loader and action from the module. But it doesn't say anything about clientLoader. So this may require unstable_splitRouteModules to split the clientLoader off from the component export.
Activity
david-crespo commentedon Mar 3, 2025
RRv7 in framework mode may or may not fix this. As their docs point out, the Vite plugin removes exports like
loaderandactionfrom the module. But it doesn't say anything aboutclientLoader. So this may requireunstable_splitRouteModulesto split theclientLoaderoff from the component export.