Skip to content

docs(start): document route and asset base paths#7882

Open
whizzkid1452 wants to merge 1 commit into
TanStack:mainfrom
whizzkid1452:bug/start-basepath-docs
Open

docs(start): document route and asset base paths#7882
whizzkid1452 wants to merge 1 commit into
TanStack:mainfrom
whizzkid1452:bug/start-basepath-docs

Conversation

@whizzkid1452

@whizzkid1452 whizzkid1452 commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • Explain that Vite base prefixes asset URLs while Start router.basepath prefixes application routes and server functions.
  • Add examples for matching route and asset prefixes and for serving them from separate paths.
  • Add the Base Paths guide to the React and Solid Start navigation.

Closes #4888

Test plan

  • pnpm test:docs
  • Validate docs/start/config.json with JSON.parse
  • Format the changed files with Prettier
  • Run affected ESLint, type, unit, and build targets against upstream/main (no affected projects for this documentation-only change)

Summary by CodeRabbit

  • Documentation
    • Added a new Base Paths guide covering asset prefixes, application routes, server functions, deployment patterns, and verification steps.
    • Added Base Paths navigation entries for React and Solid framework documentation.
    • Linked the Solid guide to the shared Base Paths documentation.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds Base Paths documentation describing Vite asset prefixes and router route prefixes, provides a Solid reference to the React guide, and links both guides from framework navigation.

Changes

Base Paths Documentation

Layer / File(s) Summary
Base path configuration guide
docs/start/framework/react/guide/base-paths.md, docs/start/framework/solid/guide/base-paths.md
Adds the React Base Paths guide and a Solid reference to it, covering configuration patterns, URL mappings, and verification steps.
Framework navigation integration
docs/start/config.json
Adds Base Paths entries to the React and Solid Server & Execution navigation sections.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested labels: documentation

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the doc update about base paths for routes and assets.
Linked Issues check ✅ Passed The new guides document Vite base, router.basepath, route and asset prefixes, and the deployment patterns requested by #4888.
Out of Scope Changes check ✅ Passed The changes stay within documentation and navigation updates for base paths, with no unrelated code or config changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
docs/start/config.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

@whizzkid1452
whizzkid1452 marked this pull request as ready for review July 23, 2026 09:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/start/framework/react/guide/base-paths.md`:
- Around line 38-46: Update the base-paths documentation around the URL table to
define serverFns.base in the preceding configuration example, or explicitly
document its default value and how it combines with router.basepath for
server-function URLs. Ensure the table’s server-function prefix source is
understandable from the surrounding text.

In `@docs/start/framework/solid/guide/base-paths.md`:
- Around line 1-2: Update the Solid base-paths guide referenced by its
frontmatter so it no longer serves the React guide verbatim. Make the shared
explanation framework-neutral and replace React-specific configuration such as
`@tanstack/react-start/plugin/vite`, `@vitejs/plugin-react`, and viteReact() with
valid Solid-specific examples.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4dff169e-ef4e-4413-b9ca-3c9c6365acd8

📥 Commits

Reviewing files that changed from the base of the PR and between a76c192 and ec92b3a.

📒 Files selected for processing (3)
  • docs/start/config.json
  • docs/start/framework/react/guide/base-paths.md
  • docs/start/framework/solid/guide/base-paths.md

Comment on lines +38 to +46
This configuration produces URLs with the following responsibilities:

| URL | Prefix source |
| -------------------- | -------------------------------------- |
| `/app/about` | `router.basepath` |
| `/app/_serverFn/...` | `router.basepath` and `serverFns.base` |
| `/app/assets/...` | Vite `base` |

If you omit `router.basepath`, Start derives it from a path-based Vite `base`. Setting both explicitly can make the deployment contract easier to see.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Define serverFns.base before using it in the URL table.

The table introduces serverFns.base as part of the server-function URL, but neither example defines it nor explains its default or composition with router.basepath. Add the relevant configuration or document the default and composition explicitly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/start/framework/react/guide/base-paths.md` around lines 38 - 46, Update
the base-paths documentation around the URL table to define serverFns.base in
the preceding configuration example, or explicitly document its default value
and how it combines with router.basepath for server-function URLs. Ensure the
table’s server-function prefix source is understandable from the surrounding
text.

Comment on lines +1 to +2
---
ref: docs/start/framework/react/guide/base-paths.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Make the Solid guide framework-specific before exposing it.

This reference serves the React guide verbatim, including @tanstack/react-start/plugin/vite, @vitejs/plugin-react, and viteReact(). Solid users cannot safely copy that configuration. Keep the shared explanation framework-neutral or add Solid-specific examples.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/start/framework/solid/guide/base-paths.md` around lines 1 - 2, Update
the Solid base-paths guide referenced by its frontmatter so it no longer serves
the React guide verbatim. Make the shared explanation framework-neutral and
replace React-specific configuration such as `@tanstack/react-start/plugin/vite`,
`@vitejs/plugin-react`, and viteReact() with valid Solid-specific examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[start] Incomplete basepath handling

1 participant