Skip to content

Regression: Conflicting configuration paths when lazy loading layout and index routes #6230

@Xhale1

Description

@Xhale1

Which project does this relate to?

Router

Describe the bug

When lazy loading an index route and a layout route for the same path, tanstack router's vite codegen gives the following error:

Error: Conflicting configuration paths were found for the following routes: "/path", "/path".
Please ensure each Route has a unique full path.
Conflicting files: 
 /home/projects/github-qrvf1otd/src/routes/path.lazy.tsx
 /home/projects/github-qrvf1otd/src/routes/path.index.lazy.tsx

Your Example Website or App

https://stackblitz.com/edit/github-qrvf1otd?file=src%2Froutes%2Fpath.index.lazy.tsx

Steps to Reproduce the Bug or Issue

  1. Go to the example url where file based routing is used
  2. Observe path.index.lazy.tsx and path.lazy.tsx int the routes directory
  3. Run npm run dev if not started automatically and observe the error in route codegen

Expected behavior

There is no error when lazy loading index and layout routes.

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.143.11 (started in last few days)
  • OS: macOS
  • Browser: Chrome
  • Browser Version: 143.0.7499.170
  • Bundler: vite
  • Bundler Version: 7.3.0

Additional context

Possibly related to #5421

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