Skip to content

Conversation

@spinner5
Copy link

@spinner5 spinner5 commented Feb 1, 2026

The documentation says following:

Create the following files:

src/routes/__root.tsx (with two '_' characters)
src/routes/index.tsx
src/routes/about.tsx
src/main.tsx

This is problem because the routeTree.gen is generated in root of the src folder.

Summary by CodeRabbit

  • Documentation
    • Corrected import path in React Router manual installation guide examples to ensure proper module resolution for developers following manual setup.

✏️ Tip: You can customize this high-level summary in your review settings.

The documentation says following:

Create the following files:

src/routes/__root.tsx (with two '_' characters)
src/routes/index.tsx
src/routes/about.tsx
src/main.tsx

This is problem because the routeTree.gen is generated in root of the src folder.
@github-actions github-actions bot added the documentation Everything documentation related label Feb 1, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 1, 2026

📝 Walkthrough

Walkthrough

Updated the import path for routeTree from ./routeTree.gen to ../routeTree.gen in two locations within the React Router manual documentation. This adjusts module resolution to reference the file from the parent directory.

Changes

Cohort / File(s) Summary
Documentation - Import Path Fix
docs/router/framework/react/installation/manual.md
Corrected relative import paths for routeTree.gen from ./routeTree.gen to ../routeTree.gen in main.tsx example and surrounding context.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • TanStack/router#6025 — Modifies documentation guidance related to the routeTree.gen generated file.
  • TanStack/router#5111 — Fixes similar incorrect relative path issues in React router documentation (./... to ../...).
  • TanStack/router#5443 — Modifies the same file with manual installation documentation updates.

Suggested reviewers

  • Insik-Han

Poem

🐰 Hop, skip, and dot-dot-slash,
Up one level, quick as a flash,
Import paths now point the right way,
Documentation's fixed for the day! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'docs: fix import path for routeTree in manual.md' clearly and accurately summarizes the main change, which is correcting an import path in the documentation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@spinner5 spinner5 changed the title Fix import path for routeTree in manual.md docs: fix import path for routeTree in manual.md Feb 1, 2026
@nlynzaad
Copy link
Contributor

nlynzaad commented Feb 1, 2026

Thanks for this. Not sure I follow what we are correcting here.

The section of the guide is specific to src/main.tsx and the routetree is generated in the same src folder src/routetree.gen.ts. The path of ./routetree.gen.ts is correct relative to the main.tsx file.

@spinner5
Copy link
Author

spinner5 commented Feb 1, 2026

Thanks for this. Not sure I follow what we are correcting here.

The section of the guide is specific to src/main.tsx and the routetree is generated in the same src folder src/routetree.gen.ts. The path of ./routetree.gen.ts is correct relative to the main.tsx file.

Hi, I'm sorry for wasting your time with this. I missread that main.tsx was inside routes folder... that's why I was having issues getting this working. Brainfog you know :D Closed this.

@spinner5 spinner5 closed this Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants