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

Duplicate virtual route generation with nested layout routes #2360

Open
Spaubleit opened this issue Sep 18, 2024 · 0 comments
Open

Duplicate virtual route generation with nested layout routes #2360

Spaubleit opened this issue Sep 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Spaubleit
Copy link

Which project does this relate to?

Router

Describe the bug

I have simplified file structure like this:
Image
In a real application each directory contains additional routes.

As you can see I don't have duplicated file routes. But after generation I get duplicated routes in routeTree.gen.ts:

// Create Virtual Routes

const ProtectedSystemsSysIdImport = createFileRoute(
  '/_protected/systems/$sysId',
)()
const ProtectedSystemsSysIdSysLayoutEditImport = createFileRoute(
  '/_protected/systems/$sysId/_sys-layout/edit',
)()

Why is ProtectedSystemsSysIdImport being created when I already have _public/systems.$sysId.tsx?
Is it possible to restructure my code to fix this issue or is this a problem in generator?

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-6ambir

Steps to Reproduce the Bug or Issue

  1. npm run dev

Expected behavior

I expect to get valid route tree when there are no conflicting route files in the application.

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Browser: Firefox
  • Version: 129.0

Additional context

No response

@schiller-manuel schiller-manuel added the bug Something isn't working label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants