docs(start): document route and asset base paths#7882
Conversation
📝 WalkthroughWalkthroughAdds 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. ChangesBase Paths Documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.jsonTraceback (most recent call last): 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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
docs/start/config.jsondocs/start/framework/react/guide/base-paths.mddocs/start/framework/solid/guide/base-paths.md
| 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. |
There was a problem hiding this comment.
🎯 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.
| --- | ||
| ref: docs/start/framework/react/guide/base-paths.md |
There was a problem hiding this comment.
🎯 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.
Summary
baseprefixes asset URLs while Startrouter.basepathprefixes application routes and server functions.Closes #4888
Test plan
pnpm test:docsdocs/start/config.jsonwithJSON.parseupstream/main(no affected projects for this documentation-only change)Summary by CodeRabbit