Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoCodeSplitting causes entire app re-render #2676

Open
pavle99 opened this issue Oct 30, 2024 · 1 comment
Open

autoCodeSplitting causes entire app re-render #2676

pavle99 opened this issue Oct 30, 2024 · 1 comment
Labels
information needed Further information is requested

Comments

@pavle99
Copy link

pavle99 commented Oct 30, 2024

Which project does this relate to?

Router

Describe the bug

When autoCodeSplitting is set to true in vite.config.ts, every time I change anything in a route 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.

Removing autoCodeSplitting from vite.config.ts makes everything work normally, ie. changing something in a route.tsx file doesn't re-render the entire app, just the part that got changed.

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-1hpdjf?file=src%2Froutes%2Findex.tsx&preset=node

Steps to Reproduce the Bug or Issue

Change anything inside any route file.
Entire app re-renders.

Expected behavior

Expected only the DOM node where the change happens to re-render.

Screenshots or Videos

No response

Platform

  • OS: Windows 11
  • Browser: Chrome
  • Version: 130.0.6723.71 (Official Build) (64-bit)

Additional context

No response

@SeanCassiere
Copy link
Member

We'll need to wait for some resolution on the #2316 branch, as that contains many related changes as to how autoCodeSplitting plays with the rest of the dev environment.

@SeanCassiere SeanCassiere added the information needed Further information is requested label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information needed Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants