Skip to content

autoCodeSplitting causes entire app re-render #2676

Description

@pavle99

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions