Skip to content

routeTree generation breaks when using different root in vite config #5658

@RMHonor

Description

@RMHonor

Which project does this relate to?

Router

Describe the bug

The previously fixed bug #3624 looks to have regressed.

Your Example Website or App

https://stackblitz.com/edit/github-l4ck9hye?file=vite.config.js

Steps to Reproduce the Bug or Issue

  1. Go to the stackblitz link
  2. Attempt to run the app
  3. Generated folder ./src/generated is created, but is empty

Expected behavior

Generated files are output relative to the Vite root.

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.333.32
  • OS: macOS
  • Browser: Chrome
  • Browser Version: 141
  • Bundler: Vite
  • Bundler Version: 7.1.7

Additional context

I believe the output folder is correctly respecting the Vite root, but the input (i.e. routes folder) does not.

Possibly introduced by https://github.com/TanStack/router/pull/5189/files#diff-f0d23c6a1109a224ba38acbd71932c2aeb3f0e5d855ff06e552f2f7ed7cd1816 ?

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