Skip to content

docs: fix import path for routeTree in manual.md - #6570

Closed
ghost wants to merge 1 commit into
mainfrom
unknown repository
Closed

docs: fix import path for routeTree in manual.md#6570
ghost wants to merge 1 commit into
mainfrom
unknown repository

Conversation

@ghost

@ghostghost commented Feb 1, 2026

Copy link
Copy Markdown

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-actionsgithub-actionsBot added the documentation Everything documentation related label Feb 1, 2026
@coderabbitai

coderabbitaiBot commented Feb 1, 2026

Copy link
Copy Markdown
Contributor
📝 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 nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check✅ PassedThe 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.

@ghostghost changed the title Fix import path for routeTree in manual.mddocs: fix import path for routeTree in manual.mdFeb 1, 2026
@nlynzaad

Copy link
Copy Markdown
Contributor

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.

@ghost

ghost commented Feb 1, 2026

Copy link
Copy Markdown
Author

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.

@ghostghost closed this Feb 1, 2026
This pull request was closed.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationEverything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@nlynzaad