Skip to content

enableRouteGeneration: false also disables autoCodeSplitting #5087

@high-risc

Description

@high-risc

Which project does this relate to?

Router

Describe the bug

When using the Vite plugin, if you set enableRouteGeneration: false (for instance if you don't want to generate routes when building since they shouldn't be changing) and autoCodeSplitting: true, then it won't automatically code split the built version.

Your Example Website or App

N/A

Steps to Reproduce the Bug or Issue

  1. Set enableRouteGeneration: false and autoCodeSplitting: true
  2. Build the application and routes won't be split automatically, you need to use .lazy

Expected behavior

I expect to have automatic code splitting regardless of what is set for enableRouteGeneration

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.131.35
  • OS: Windows
  • Browser: N/A
  • Browser Version: N/A
  • Bundler: Vite
  • Bundler Version: 7.1.4

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions