-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs(solid-router): router-monorepo-simple example #5852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(solid-router): router-monorepo-simple example #5852
Conversation
WalkthroughAdds a complete Solid.js monorepo example demonstrating TanStack router with three packages: a router library with file-based routes and type augmentations, a post-feature UI library, and a main app. Includes build configuration, loaders for data fetching, and documentation on type-safe cross-package linking. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Areas requiring attention:
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
|
View your CI Pipeline Execution ↗ for commit 349c67b
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
examples/solid/router-monorepo-simple/assets/graph.pngis excluded by!**/*.pngpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (31)
docs/router/config.json(1 hunks)examples/solid/router-monorepo-simple/.gitignore(1 hunks)examples/solid/router-monorepo-simple/.stackblitzrc(1 hunks)examples/solid/router-monorepo-simple/.vscode/settings.json(1 hunks)examples/solid/router-monorepo-simple/README.md(1 hunks)examples/solid/router-monorepo-simple/package.json(1 hunks)examples/solid/router-monorepo-simple/packages/app/index.html(1 hunks)examples/solid/router-monorepo-simple/packages/app/package.json(1 hunks)examples/solid/router-monorepo-simple/packages/app/src/main.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/app/src/style.css(1 hunks)examples/solid/router-monorepo-simple/packages/app/tsconfig.json(1 hunks)examples/solid/router-monorepo-simple/packages/app/vite.config.ts(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/package.json(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/src/index.ts(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.json(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/package.json(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/index.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/router.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/tsconfig.json(1 hunks)examples/solid/router-monorepo-simple/packages/router/vite.config.ts(1 hunks)examples/solid/router-monorepo-simple/pnpm-workspace.yaml.example(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript in strict mode with extensive type safety across the codebase
Files:
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsxexamples/solid/router-monorepo-simple/packages/post-feature/src/index.tsexamples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsxexamples/solid/router-monorepo-simple/packages/router/src/fetch/posts.tsexamples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsxexamples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsxexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/packages/post-feature/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.tsexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/app/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/app/src/main.tsx
**/src/routes/**
📄 CodeRabbit inference engine (AGENTS.md)
Place file-based routes under src/routes/ directories
Files:
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts
examples/{react,solid}/**
📄 CodeRabbit inference engine (AGENTS.md)
Keep example applications under examples/react/ and examples/solid/
Files:
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/packages/post-feature/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsxexamples/solid/router-monorepo-simple/packages/post-feature/src/index.tsexamples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsxexamples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/fetch/posts.tsexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsxexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsxexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/packages/post-feature/vite.config.tsexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.tsexamples/solid/router-monorepo-simple/packages/app/src/style.cssexamples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/pnpm-workspace.yaml.exampleexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/app/vite.config.tsexamples/solid/router-monorepo-simple/packages/app/index.htmlexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/app/src/main.tsx
**/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Use workspace:* protocol for internal dependencies in package.json files
Files:
examples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/app/package.json
docs/{router,start}/**
📄 CodeRabbit inference engine (AGENTS.md)
Place router docs under docs/router/ and start framework docs under docs/start/
Files:
docs/router/config.json
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to examples/{react,solid}/** : Keep example applications under examples/react/ and examples/solid/
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-devtools,*-router-devtools}/** : Keep router devtools packages in packages/router-devtools/ and packages/*-router-devtools/
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/packages/post-feature/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/.stackblitzrcexamples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsxexamples/solid/router-monorepo-simple/packages/post-feature/src/index.tsexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsxexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsxexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/.vscode/settings.jsonexamples/solid/router-monorepo-simple/packages/post-feature/vite.config.tsexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.tsexamples/solid/router-monorepo-simple/packages/app/src/style.cssexamples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/app/src/main.tsx
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.tsexamples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/app/src/main.tsx
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/packages/post-feature/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/.stackblitzrcexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/.vscode/settings.jsonexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.tsexamples/solid/router-monorepo-simple/packages/router/src/index.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase
Applied to files:
examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.jsonexamples/solid/router-monorepo-simple/.vscode/settings.jsonexamples/solid/router-monorepo-simple/packages/router/tsconfig.json
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.
Applied to files:
examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.tsexamples/solid/router-monorepo-simple/packages/app/src/main.tsx
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/src/routes/** : Place file-based routes under src/routes/ directories
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/.stackblitzrcexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/.vscode/settings.jsonexamples/solid/router-monorepo-simple/packages/post-feature/vite.config.tsexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.tsexamples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/pnpm-workspace.yaml.exampleexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/app/src/main.tsx
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 5330
File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61
Timestamp: 2025-10-01T18:31:35.420Z
Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/.vscode/settings.jsonexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-devtools,*-router-devtools}/** : Keep router devtools packages in packages/router-devtools/ and packages/*-router-devtools/
Applied to files:
examples/solid/router-monorepo-simple/.stackblitzrcexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/.vscode/settings.jsonexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/pnpm-workspace.yaml.example
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/
Applied to files:
docs/router/config.jsonexamples/solid/router-monorepo-simple/README.md
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to examples/{react,solid}/** : Keep example applications under examples/react/ and examples/solid/
Applied to files:
docs/router/config.jsonexamples/solid/router-monorepo-simple/packages/app/src/main.tsx
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-plugin/** : Use unplugin for universal bundler plugins in the router-plugin package
Applied to files:
examples/solid/router-monorepo-simple/packages/router/package.json
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/package.json : Use workspace:* protocol for internal dependencies in package.json files
Applied to files:
examples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/pnpm-workspace.yaml.example
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{*-start,start-*}/** : Name and place Start framework packages under packages/*-start/ or packages/start-*/
Applied to files:
examples/solid/router-monorepo-simple/pnpm-workspace.yaml.example
🧬 Code graph analysis (14)
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsx (3)
examples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts (1)
Route(4-6)examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts (1)
Route(4-8)examples/solid/router-monorepo-simple/packages/router/src/index.ts (1)
Link(20-20)
examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts (3)
examples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts (1)
Route(4-6)examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsx (1)
Route(3-12)examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts (1)
fetchPosts(27-33)
examples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsx (2)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (3)
getRouteApi(24-24)Link(20-20)Outlet(19-19)examples/react/router-monorepo-simple/packages/post-feature/src/PostList.tsx (1)
PostsListComponent(5-34)
examples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsx (2)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (3)
ErrorComponentProps(27-27)PostNotFoundError(14-14)ErrorComponent(25-25)examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts (1)
PostNotFoundError(9-9)
examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts (1)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (1)
PostNotFoundError(14-14)
examples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsx (1)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (2)
Link(20-20)Outlet(19-19)
examples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx (4)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (1)
getRouteApi(24-24)examples/react/router-monorepo-simple-lazy/packages/post-feature/src/PostIdPage.tsx (1)
PostIdComponent(7-16)examples/react/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx (1)
PostIdComponent(5-14)e2e/react-router/generator-cli-only/src/routes/posts.$postId.tsx (1)
PostComponent(19-28)
examples/solid/router-monorepo-simple/packages/router/src/router.tsx (1)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (3)
router(12-12)RouterType(3-3)RouterIds(3-3)
examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts (1)
examples/solid/basic-ssr-streaming-file-based/vite.config.js (1)
__filename(7-7)
examples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts (2)
examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts (1)
Route(4-8)examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts (1)
fetchPost(11-25)
examples/solid/router-monorepo-simple/packages/router/vite.config.ts (1)
examples/solid/basic-ssr-streaming-file-based/vite.config.js (1)
__filename(7-7)
examples/solid/router-monorepo-simple/packages/app/vite.config.ts (1)
examples/solid/basic-ssr-streaming-file-based/vite.config.js (1)
__filename(7-7)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (1)
examples/solid/router-monorepo-simple/packages/router/src/router.tsx (1)
router(7-13)
examples/solid/router-monorepo-simple/packages/app/src/main.tsx (5)
examples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsx (1)
PostsListComponent(5-34)examples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx (1)
PostIdComponent(5-14)examples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsx (1)
RootComponent(4-23)examples/solid/router-monorepo-simple/packages/router/src/router.tsx (2)
RouterIds(16-16)router(7-13)examples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsx (1)
PostErrorComponent(7-13)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Preview
🔇 Additional comments (29)
examples/solid/router-monorepo-simple/.gitignore (2)
6-6: The.gitignoreis correctly configured for this monorepo example.The
*.jspattern is appropriate—the project uses TypeScript exclusively for configs (vite.config.ts, tsconfig.json), so this pattern exists to ignore compiled JavaScript output, not intentional config files. Thepnpm-workspace.yamlpattern is also correct: the example commitspnpm-workspace.yaml.example, and the.gitignoreproperly ignores the runtimepnpm-workspace.yamlfile that users will create locally by copying the example. This is standard practice for example projects and does not defeat their purpose.Likely an incorrect or invalid review comment.
13-13: Update README.md to document thepnpm-workspace.yamlsetup.The example provides
pnpm-workspace.yaml.exampleas a template but the README doesn't explain this. Users should be informed that:
- If running this example within the main monorepo, the root
pnpm-workspace.yamlis used automatically- If running the example in isolation, they must rename
pnpm-workspace.yaml.exampletopnpm-workspace.yamlAdd a setup section clarifying this requirement to prevent confusion and ensure the example is truly runnable in both contexts.
examples/solid/router-monorepo-simple/.vscode/settings.json (1)
1-11: LGTM! Appropriate VS Code configuration for generated files.The settings correctly exclude
routeTree.gen.tsfrom file watching, search results, and mark it as read-only, which aligns with the autogenerated nature of this file.examples/solid/router-monorepo-simple/pnpm-workspace.yaml.example (1)
1-2: LGTM! Standard pnpm workspace configuration.The workspace pattern correctly includes all packages under
packages/*, and the.exampleextension is appropriate for sandbox environments where the file is copied during initialization.examples/solid/router-monorepo-simple/.stackblitzrc (1)
1-3: LGTM! StackBlitz initialization is properly configured.The start command correctly copies the workspace configuration from the example file, installs dependencies, and starts the development server in the appropriate sequence.
examples/solid/router-monorepo-simple/packages/app/tsconfig.json (1)
1-13: LGTM! TypeScript configuration follows best practices.The config appropriately enables strict mode and includes all necessary Solid.js-specific settings (jsx, jsxImportSource). Compiler options are well-suited for a modern Solid.js application.
docs/router/config.json (1)
685-688: LGTM! Documentation navigation entry is correctly configured.The new "Monorepo basic" entry is properly placed within the Solid Router Examples section and follows the same structure as other example entries. The path correctly references the new example location.
examples/solid/router-monorepo-simple/packages/app/index.html (1)
1-12: LGTM! Standard Vite application entry point.The HTML structure is appropriate with correct meta tags, a root container for the Solid.js app, and a module script that loads the main TypeScript entry point.
examples/solid/router-monorepo-simple/packages/router/tsconfig.json (1)
1-14: LGTM! TypeScript configuration is well-structured for a library package.The config enables strict mode and includes appropriate Solid.js settings. The
includedirective properly scopes compilation to thesrcdirectory, which is a good practice for library packages.examples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsx (1)
1-34: LGTM! Component correctly implements Solid.js patterns.The component appropriately:
- Calls
posts()as an accessor function (line 11), which is correct for Solid.js signals/resources- Uses
classinstead ofclassNamefor DOM attributes (lines 9, 14, 20-21)- Leverages the router API with proper typing via
getRouteApi- Includes a non-existent post for error handling demonstration
The implementation is well-structured and follows Solid.js conventions.
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsx (1)
1-12: LGTM!Clean root route definition with a proper 404 handler. The notFoundComponent correctly uses the Link component to navigate back to the home page.
examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.json (1)
1-13: LGTM!Proper TypeScript configuration with strict mode enabled and Solid-specific JSX settings. The configuration aligns with the coding guidelines for strict TypeScript usage.
Based on coding guidelines
examples/solid/router-monorepo-simple/packages/post-feature/src/index.ts (1)
1-3: LGTM!Clean barrel export pattern for the post-feature package's public API surface.
examples/solid/router-monorepo-simple/packages/app/src/style.css (1)
1-13: LGTM!Standard Tailwind CSS setup with proper dark mode support using color-scheme and theme-aware styling.
examples/solid/router-monorepo-simple/packages/post-feature/package.json (1)
11-11: LGTM!Correctly uses the
workspace:*protocol for the internal router dependency, following the coding guidelines for internal dependencies in monorepos.Based on coding guidelines
examples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx (1)
1-14: LGTM!Correct implementation of a Solid Router component. The use of
post()as a function call (lines 10-11) is appropriate since Solid'suseLoaderData()returns a reactive signal/accessor. Theclassattribute is also correct for Solid (notclassNamelike React).examples/solid/router-monorepo-simple/README.md (1)
24-24: The asset file is confirmed to exist atexamples/solid/router-monorepo-simple/assets/graph.png. No issues found.examples/solid/router-monorepo-simple/package.json (1)
10-23: Create thepnpm-workspace.yamlconfiguration file.The
pnpm-workspace.yamlfile is missing from the monorepo root. Onlypnpm-workspace.yaml.exampleexists. Without the actual configuration file, pnpm will not recognize this as a workspace, and dependency resolution forworkspace:*references inpackages/app/package.jsonwill fail.Create
examples/solid/router-monorepo-simple/pnpm-workspace.yamlfrom the example:packages: - 'packages/*'⛔ Skipped due to learnings
Learnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to **/package.json : Use workspace:* protocol for internal dependencies in package.json filesLearnt from: CR Repo: TanStack/router PR: 0 File: AGENTS.md:0-0 Timestamp: 2025-09-23T17:36:12.598Z Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/examples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts (1)
1-6: LGTM! Clean file-based route definition.The dynamic route definition follows best practices for TanStack Router. The loader correctly extracts the
postIdparameter and passes it to the data fetching function.examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts (1)
1-8: LGTM! Index route is correctly configured.The root route definition properly loads posts data. The loader implementation is straightforward and correct.
examples/solid/router-monorepo-simple/packages/app/package.json (1)
1-35: LGTM! Package configuration follows monorepo best practices.The package.json correctly uses the
workspace:*protocol for internal dependencies (lines 12-13) as per coding guidelines. The NX configuration properly ensures dependencies are built before the dev server starts.examples/solid/router-monorepo-simple/packages/router/package.json (1)
1-24: LGTM! Library package is correctly configured.The package is properly set up as a buildable library with appropriate entry points and build configuration. The inclusion of
tsc --noEmitin the build script ensures type checking.examples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsx (1)
1-13: LGTM! Error handling component is well-structured.The component correctly discriminates between
PostNotFoundErrorand other errors, providing a custom message for the specific case while delegating generic error handling toErrorComponent.examples/solid/router-monorepo-simple/packages/app/src/main.tsx (2)
16-32: LGTM! Demonstrates programmatic route configuration.The
routerMappattern withsatisfies Record<RouterIds, ...>provides excellent type safety while allowing programmatic component assignment. TheEmptyComponentfallback for routes without explicit components is a sensible default.
35-50: LGTM! Error component mapping follows the same pattern.The error component assignment logic correctly filters out null entries and updates routes that need custom error handling.
examples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsx (1)
1-23: LGTM! Root component is well-structured.The component correctly uses Solid.js conventions (
classinstead ofclassName), configures the navigation link with active state handling, and integrates the router devtools.examples/solid/router-monorepo-simple/packages/app/vite.config.ts (1)
1-11: LGTM! Vite configuration is well-structured.The configuration correctly derives
__filenameand__dirnamefor ESM modules, configures appropriate ports, and includes the necessary plugins for Solid.js development.Also applies to: 13-37
examples/solid/router-monorepo-simple/packages/router/vite.config.ts (1)
1-37: LGTM!The Vite configuration is well-structured with appropriate plugin setup (dts, solid, and tanstackRouter) and correctly externalizes dependencies for library builds.
examples/solid/router-monorepo-simple/packages/router/src/index.ts (1)
1-27: LGTM!The module augmentation pattern and re-export strategy correctly enforce type safety across the monorepo by ensuring all packages use the registered router instance. The comment on lines 16-17 clearly explains this important pattern.
|
|
||
| export default defineConfig({ | ||
| root: __dirname, | ||
| cacheDir: '../../node_modules/.vite/packages/router', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the cache directory path.
The cacheDir references packages/router but this is the app package configuration. It should reference packages/app instead.
Apply this diff:
- cacheDir: '../../node_modules/.vite/packages/router',
+ cacheDir: '../../node_modules/.vite/packages/app',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| cacheDir: '../../node_modules/.vite/packages/router', | |
| cacheDir: '../../node_modules/.vite/packages/app', |
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/app/vite.config.ts around line
12, the cacheDir points to '../../node_modules/.vite/packages/router' which
incorrectly references the router package; update the path to reference this app
package by changing it to '../../node_modules/.vite/packages/app' so Vite uses
the app's cache directory.
|
|
||
| export default defineConfig({ | ||
| root: __dirname, | ||
| cacheDir: '../../node_modules/.vite/packages/router', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the cacheDir path.
The cacheDir references packages/router but this configuration is for the post-feature package. This will cause cache collisions between the two packages.
Apply this diff:
- cacheDir: '../../node_modules/.vite/packages/router',
+ cacheDir: '../../node_modules/.vite/packages/post-feature',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| cacheDir: '../../node_modules/.vite/packages/router', | |
| cacheDir: '../../node_modules/.vite/packages/post-feature', |
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts
around line 12, the cacheDir points to
'../../node_modules/.vite/packages/router' which causes cache collisions with
the router package; update the cacheDir to a unique path for this package (for
example '../../node_modules/.vite/packages/post-feature') so the post-feature
package uses its own Vite cache.
| body: string | ||
| } | ||
|
|
||
| export class PostNotFoundError extends Error {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass error message to parent Error constructor.
The PostNotFoundError class should pass the error message to the parent Error constructor to ensure proper error message handling and stack trace generation.
Apply this diff:
-export class PostNotFoundError extends Error {}
+export class PostNotFoundError extends Error {
+ constructor(message: string) {
+ super(message)
+ }
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export class PostNotFoundError extends Error {} | |
| export class PostNotFoundError extends Error { | |
| constructor(message: string) { | |
| super(message) | |
| } | |
| } |
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts
around line 9, the PostNotFoundError class currently doesn't pass a message to
the Error constructor; change it to define a constructor that accepts an
optional message and calls super(message), set this.name = 'PostNotFoundError',
and restore the prototype chain (Object.setPrototypeOf(this,
PostNotFoundError.prototype)) to ensure proper message and stack behavior.
| const post = await axios | ||
| .get<PostType>(`https://jsonplaceholder.typicode.com/posts/${postId}`) | ||
| .then((r) => r.data) | ||
| .catch((err) => { | ||
| if (err.status === 404) { | ||
| throw new PostNotFoundError(`Post with id "${postId}" not found!`) | ||
| } | ||
| throw err | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify error property access for redaxios.
The code accesses err.status to check for 404 errors. Ensure that redaxios exposes the status code on the error object in this manner. Some HTTP libraries nest the status code differently (e.g., err.response.status).
Run the following script to check the redaxios documentation or implementation:
🌐 Web query:
Does redaxios expose HTTP status codes as err.status or err.response.status?
💡 Result:
redaxios follows the axios API: HTTP error status is on err.response.status (not err.status). [1][2]
Sources:
- redaxios package description (uses Axios API). [npm redaxios]. [1]
- Axios docs — error handling shows status on error.response.status. [2]
Fix error property access: use err.response.status instead of err.status.
Based on redaxios documentation, which follows the axios API, HTTP error status codes are exposed on err.response.status, not err.status. The current code accessing err.status will fail because that property is undefined. Change line 18 from if (err.status === 404) to if (err.response?.status === 404) (or if (err.response && err.response.status === 404)).
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts
around lines 14 to 22, the catch handler incorrectly checks err.status which is
undefined for axios/redaxios errors; change the check to use
err.response?.status (or explicit err.response && err.response.status) and throw
PostNotFoundError when that equals 404, otherwise rethrow the original error.
| defaultPendingComponent: () => ( | ||
| <div>Loading form global pending component...</div> | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in loading message.
Line 10 contains a typo: "Loading form global pending component..." should read "Loading from global pending component...".
Apply this diff to fix the typo:
defaultPendingComponent: () => (
- <div>Loading form global pending component...</div>
+ <div>Loading from global pending component...</div>
),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| defaultPendingComponent: () => ( | |
| <div>Loading form global pending component...</div> | |
| ), | |
| defaultPendingComponent: () => ( | |
| <div>Loading from global pending component...</div> | |
| ), |
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/router/src/router.tsx around
lines 9 to 11, there is a typo in the defaultPendingComponent text ("Loading
form global pending component..."); change "form" to "from" so the message reads
"Loading from global pending component..." and save the file.
| - `npm install` or `yarn` | ||
| - `npm dev` or `yarn dev` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update package manager instructions to match the project setup.
The installation commands reference npm and yarn, but the root package.json uses pnpm workspace filtering (lines 5-8). Update the commands to reflect pnpm install and pnpm dev for consistency.
Apply this diff:
-- `npm install` or `yarn`
-- `npm dev` or `yarn dev`
+- `pnpm install`
+- `pnpm dev`📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - `npm install` or `yarn` | |
| - `npm dev` or `yarn dev` | |
| - `pnpm install` | |
| - `pnpm dev` |
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/README.md around lines 5 to 6, the
README lists npm/yarn commands but the repository uses pnpm workspaces; update
the instructions to use pnpm by replacing "npm install" or "yarn" with "pnpm
install" (or "pnpm i") and replace "npm dev" or "yarn dev" with "pnpm dev" (or
the appropriate pnpm workspace-filtered dev command) so the commands match the
project's pnpm setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (4)
examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.json (1)
1-13: Add "include" field for consistency.The post-feature package's TypeScript config is missing the
"include"field that's present in the router package config. For consistency across the monorepo packages, consider adding it.Apply this diff:
"compilerOptions": { "strict": true, "esModuleInterop": true, "jsx": "preserve", "jsxImportSource": "solid-js", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true - } + }, + "include": ["src"] }examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts (1)
4-8: Consider simplifying the loader.The arrow function wrapper is redundant since
fetchPostsalready returns the expected value.Apply this diff to simplify:
-export const Route = createFileRoute('/')({ - loader: () => { - return fetchPosts() - }, -}) +export const Route = createFileRoute('/')({ + loader: fetchPosts, +})examples/solid/router-monorepo-simple/packages/app/package.json (1)
24-24: Consider removing unnecessary devDependency.
vite-plugin-dtsis typically used for generating TypeScript declaration files in library packages. Since this is an app package (not a library), this dependency may not be needed.If TypeScript declarations aren't required for this app package, consider removing this line:
- "vite-plugin-dts": "^4.5.4"examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts (1)
9-9: Consider adding an explicit constructor.While the default constructor behavior works, explicitly defining the constructor improves clarity and maintainability.
Apply this diff:
-export class PostNotFoundError extends Error {} +export class PostNotFoundError extends Error { + constructor(message: string) { + super(message) + this.name = 'PostNotFoundError' + } +}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
examples/solid/router-monorepo-simple/assets/graph.pngis excluded by!**/*.pngpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (31)
docs/router/config.json(1 hunks)examples/solid/router-monorepo-simple/.gitignore(1 hunks)examples/solid/router-monorepo-simple/.stackblitzrc(1 hunks)examples/solid/router-monorepo-simple/.vscode/settings.json(1 hunks)examples/solid/router-monorepo-simple/README.md(1 hunks)examples/solid/router-monorepo-simple/package.json(1 hunks)examples/solid/router-monorepo-simple/packages/app/index.html(1 hunks)examples/solid/router-monorepo-simple/packages/app/package.json(1 hunks)examples/solid/router-monorepo-simple/packages/app/src/main.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/app/src/style.css(1 hunks)examples/solid/router-monorepo-simple/packages/app/tsconfig.json(1 hunks)examples/solid/router-monorepo-simple/packages/app/vite.config.ts(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/package.json(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/src/index.ts(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.json(1 hunks)examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/package.json(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/index.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/router.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsx(1 hunks)examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts(1 hunks)examples/solid/router-monorepo-simple/packages/router/tsconfig.json(1 hunks)examples/solid/router-monorepo-simple/packages/router/vite.config.ts(1 hunks)examples/solid/router-monorepo-simple/pnpm-workspace.yaml.example(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript in strict mode with extensive type safety across the codebase
Files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsxexamples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsxexamples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsxexamples/solid/router-monorepo-simple/packages/app/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/packages/post-feature/src/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/packages/app/src/main.tsxexamples/solid/router-monorepo-simple/packages/router/src/fetch/posts.tsexamples/solid/router-monorepo-simple/packages/post-feature/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.tsexamples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsxexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts
**/src/routes/**
📄 CodeRabbit inference engine (AGENTS.md)
Place file-based routes under src/routes/ directories
Files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts
examples/{react,solid}/**
📄 CodeRabbit inference engine (AGENTS.md)
Keep example applications under examples/react/ and examples/solid/
Files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/app/index.htmlexamples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsxexamples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsxexamples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsxexamples/solid/router-monorepo-simple/packages/app/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/post-feature/src/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/app/src/main.tsxexamples/solid/router-monorepo-simple/packages/router/src/fetch/posts.tsexamples/solid/router-monorepo-simple/packages/post-feature/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/post-feature/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.tsexamples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsxexamples/solid/router-monorepo-simple/pnpm-workspace.yaml.exampleexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.tsexamples/solid/router-monorepo-simple/packages/app/src/style.css
docs/{router,start}/**
📄 CodeRabbit inference engine (AGENTS.md)
Place router docs under docs/router/ and start framework docs under docs/start/
Files:
docs/router/config.json
**/package.json
📄 CodeRabbit inference engine (AGENTS.md)
Use workspace:* protocol for internal dependencies in package.json files
Files:
examples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/post-feature/package.json
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-plugin/** : Use unplugin for universal bundler plugins in the router-plugin package
Learnt from: FatahChan
Repo: TanStack/router PR: 5475
File: e2e/react-start/basic-prerendering/src/routes/redirect/$target/via-beforeLoad.tsx:8-0
Timestamp: 2025-10-14T18:59:33.990Z
Learning: In TanStack Router e2e test files, when a route parameter is validated at the route level (e.g., using zod in validateSearch or param validation), switch statements on that parameter do not require a default case, as the validation ensures only expected values will reach the switch.
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to examples/{react,solid}/** : Keep example applications under examples/react/ and examples/solid/
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/src/routes/** : Place file-based routes under src/routes/ directories
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsdocs/router/config.jsonexamples/solid/router-monorepo-simple/packages/app/index.htmlexamples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsxexamples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsxexamples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsxexamples/solid/router-monorepo-simple/packages/app/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/post-feature/src/index.tsexamples/solid/router-monorepo-simple/.stackblitzrcexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/app/src/main.tsxexamples/solid/router-monorepo-simple/packages/post-feature/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/post-feature/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/.vscode/settings.jsonexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.tsexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.tsexamples/solid/router-monorepo-simple/packages/app/src/style.css
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/packages/app/src/main.tsxexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/post-feature/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.jsonexamples/solid/router-monorepo-simple/.vscode/settings.jsonexamples/solid/router-monorepo-simple/packages/router/src/routes/$postId.tsexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-core/** : Keep framework-agnostic core router logic in packages/router-core/
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/routes/index.tsexamples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsxexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/app/src/main.tsxexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to docs/{router,start}/** : Place router docs under docs/router/ and start framework docs under docs/start/
Applied to files:
docs/router/config.jsonexamples/solid/router-monorepo-simple/README.md
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to examples/{react,solid}/** : Keep example applications under examples/react/ and examples/solid/
Applied to files:
docs/router/config.json
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories
Applied to files:
examples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/post-feature/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/pnpm-workspace.yaml.exampleexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-devtools,*-router-devtools}/** : Keep router devtools packages in packages/router-devtools/ and packages/*-router-devtools/
Applied to files:
examples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/package.jsonexamples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/post-feature/package.jsonexamples/solid/router-monorepo-simple/pnpm-workspace.yaml.example
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/package.json : Use workspace:* protocol for internal dependencies in package.json files
Applied to files:
examples/solid/router-monorepo-simple/packages/app/package.jsonexamples/solid/router-monorepo-simple/pnpm-workspace.yaml.example
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 5330
File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61
Timestamp: 2025-10-01T18:31:35.420Z
Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/.gitignoreexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/.vscode/settings.jsonexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.
Applied to files:
examples/solid/router-monorepo-simple/packages/router/src/router.tsxexamples/solid/router-monorepo-simple/README.mdexamples/solid/router-monorepo-simple/packages/app/src/main.tsxexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/src/index.tsexamples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/router-plugin/** : Use unplugin for universal bundler plugins in the router-plugin package
Applied to files:
examples/solid/router-monorepo-simple/packages/router/package.jsonexamples/solid/router-monorepo-simple/packages/router/vite.config.tsexamples/solid/router-monorepo-simple/packages/router/src/index.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase
Applied to files:
examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/router/tsconfig.jsonexamples/solid/router-monorepo-simple/packages/app/tsconfig.json
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{*-start,start-*}/** : Name and place Start framework packages under packages/*-start/ or packages/start-*/
Applied to files:
examples/solid/router-monorepo-simple/pnpm-workspace.yaml.example
🧬 Code graph analysis (14)
examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts (1)
examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts (1)
fetchPosts(27-33)
examples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsx (2)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (3)
getRouteApi(24-24)Link(20-20)Outlet(19-19)examples/react/router-monorepo-simple/packages/post-feature/src/PostList.tsx (1)
PostsListComponent(5-34)
examples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx (3)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (1)
getRouteApi(24-24)examples/react/router-monorepo-simple-lazy/packages/post-feature/src/PostIdPage.tsx (1)
PostIdComponent(7-16)examples/react/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx (1)
PostIdComponent(5-14)
examples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsx (2)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (2)
Link(20-20)Outlet(19-19)examples/react/router-monorepo-simple/packages/app/src/rootComponent.tsx (1)
RootComponent(4-23)
examples/solid/router-monorepo-simple/packages/app/vite.config.ts (1)
examples/solid/basic-ssr-streaming-file-based/vite.config.js (1)
__filename(7-7)
examples/solid/router-monorepo-simple/packages/router/src/router.tsx (1)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (3)
router(12-12)RouterType(3-3)RouterIds(3-3)
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsx (2)
examples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts (1)
Route(4-6)examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts (1)
Route(4-8)
examples/solid/router-monorepo-simple/packages/app/src/main.tsx (5)
examples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsx (1)
PostsListComponent(5-34)examples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx (1)
PostIdComponent(5-14)examples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsx (1)
RootComponent(4-23)examples/solid/router-monorepo-simple/packages/router/src/router.tsx (2)
RouterIds(16-16)router(7-13)examples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsx (1)
PostErrorComponent(7-13)
examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts (1)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (1)
PostNotFoundError(14-14)
examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts (1)
examples/solid/basic-ssr-streaming-file-based/vite.config.js (1)
__filename(7-7)
examples/solid/router-monorepo-simple/packages/router/vite.config.ts (1)
examples/solid/basic-ssr-streaming-file-based/vite.config.js (1)
__filename(7-7)
examples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts (3)
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsx (1)
Route(3-12)examples/solid/router-monorepo-simple/packages/router/src/routes/index.ts (1)
Route(4-8)examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts (1)
fetchPost(11-25)
examples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsx (2)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (3)
ErrorComponentProps(27-27)PostNotFoundError(14-14)ErrorComponent(25-25)examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts (1)
PostNotFoundError(9-9)
examples/solid/router-monorepo-simple/packages/router/src/index.ts (1)
examples/solid/router-monorepo-simple/packages/router/src/router.tsx (1)
router(7-13)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Preview
🔇 Additional comments (33)
examples/solid/router-monorepo-simple/packages/app/src/style.css (1)
1-13: LGTM!The Tailwind CSS setup is clean and demonstrates proper dark mode support through the
color-schemeproperty and Tailwind's dark mode utilities. The file placement aligns with the example application structure, and the styling follows standard Tailwind conventions.examples/solid/router-monorepo-simple/.gitignore (3)
6-6: Verify that ignoring all.jsfiles is intentional.The pattern
*.jswill ignore all JavaScript files in the repository. In a monorepo example with build tooling, this may inadvertently ignore necessary files such as configuration files, CLI scripts, or other checked-in JavaScript artifacts. If the intent is to ignore only build outputs, consider scoping the pattern to specific directories (e.g.,dist/*.js,dist-ssr/*.js).
13-13: Clarify whetherpnpm-workspace.yamlshould be ignored in an example.Ignoring the workspace configuration file in a monorepo example is unusual, as examples should be self-contained and demonstrate the correct project structure to users. If the intent is to provide a template, ensure a corresponding
pnpm-workspace.yaml.examplefile exists and is documented so users understand how to initialize the workspace.
1-5: Standard.gitignorepatterns look good.The common entries for build outputs (
node_modules,dist,dist-ssr), local artifacts (.DS_Store,*.local), and test results are appropriate and follow standard practices.Also applies to: 8-11
examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts (2)
1-8: LGTM!Standard ESM setup for path handling is correct.
34-40: Verify self-externalization is intentional.The external list includes
'@router-solid-mono-simple/post-feature'which is the package itself. Typically, you externalize dependencies but not the package being built. This might be a copy/paste error or could be intentional for handling specific monorepo edge cases.Please confirm whether this self-externalization is necessary or should be removed.
If this is an error, apply this diff to remove the self-reference:
external: [ 'solid-js', 'solid-js/web', '@tanstack/solid-router', - '@router-solid-mono-simple/post-feature', '@router-solid-mono-simple/router', ],examples/solid/router-monorepo-simple/.stackblitzrc (1)
1-3: LGTM!The StackBlitz startup command correctly initializes the workspace by copying the example file, installing dependencies, and starting the dev server.
examples/solid/router-monorepo-simple/packages/router/tsconfig.json (1)
1-14: LGTM!The TypeScript configuration properly enables strict mode and SolidJS JSX support, aligning with the coding guidelines.
examples/solid/router-monorepo-simple/packages/router/src/routes/__root.tsx (1)
1-12: LGTM!The root route configuration correctly implements a custom notFoundComponent with appropriate navigation.
examples/solid/router-monorepo-simple/package.json (1)
1-27: LGTM!The root package.json correctly configures workspace scripts and declares external dependencies. The pnpm filter commands properly target workspace packages.
examples/solid/router-monorepo-simple/pnpm-workspace.yaml.example (1)
1-2: LGTM!The workspace configuration correctly defines the packages pattern for the monorepo structure.
examples/solid/router-monorepo-simple/.vscode/settings.json (1)
1-11: LGTM!The VSCode settings appropriately exclude the autogenerated route tree file from watchers, searches, and mark it as readonly, preventing accidental modifications.
docs/router/config.json (1)
685-688: LGTM!The documentation config correctly adds the new Solid monorepo example with appropriate labeling and path. Based on learnings.
examples/solid/router-monorepo-simple/packages/app/index.html (1)
1-12: LGTM!Standard HTML5 entrypoint for a Vite-based Solid.js application. The structure is correct and follows Vite conventions.
examples/solid/router-monorepo-simple/packages/app/tsconfig.json (1)
1-13: LGTM!TypeScript configuration is properly set up with strict mode enabled and correct Solid.js JSX settings. The configuration aligns with coding guidelines and modern tooling requirements.
examples/solid/router-monorepo-simple/packages/post-feature/package.json (1)
1-20: LGTM!Package manifest is correctly configured with workspace protocol for internal dependencies and appropriate build tooling for a library package.
examples/solid/router-monorepo-simple/packages/router/package.json (1)
1-24: LGTM!Package manifest is properly configured with appropriate dependencies for a router library package. Build tooling and output configuration are correct.
examples/solid/router-monorepo-simple/packages/post-feature/src/PostIdPage.tsx (1)
1-14: LGTM!Component correctly uses Solid.js patterns: reactive data accessed as functions (
post().title), and theclassattribute instead of React'sclassName. The implementation properly integrates with the router's loader data.examples/solid/router-monorepo-simple/packages/app/vite.config.ts (1)
23-28: Consider whether vite-plugin-dts is needed for an app package.The
vite-plugin-dtsplugin generates TypeScript declaration files, which is typically used for library packages that need to expose types to consumers. Since this is an application package (not a library), generating.d.tsfiles may be unnecessary. If the app is not being consumed as a library by other packages, consider removing this plugin.Is the app package intended to be consumed as a library by other packages in the monorepo?
examples/solid/router-monorepo-simple/packages/router/src/routes/$postId.ts (1)
1-6: LGTM!Route definition is clean and correctly implements dynamic routing with proper parameter extraction. The loader appropriately delegates to the
fetchPostfunction with the route parameter.examples/solid/router-monorepo-simple/packages/router/vite.config.ts (1)
1-37: LGTM! Well-structured Vite library configuration.The configuration correctly sets up a Solid.js library with TypeScript declarations, proper externals, and TanStack Router plugin integration.
examples/solid/router-monorepo-simple/README.md (1)
1-30: LGTM! Clear and helpful documentation.The README effectively explains the monorepo setup, TypeScript augmentation challenges, and the solution architecture.
examples/solid/router-monorepo-simple/packages/app/src/main.tsx (3)
16-32: LGTM! Type-safe route-to-component mapping.The approach of using
satisfieswith RouterIds ensures type safety while the runtime loop correctly updates the router configuration. The fallback to EmptyComponent provides a safe default.
34-50: LGTM! Error component mapping is well-structured.The error component map follows a consistent pattern and appropriately handles null entries with an early return.
52-56: LGTM! Safe render initialization.The innerHTML check before rendering is a good practice to avoid re-mounting in development environments with HMR.
examples/solid/router-monorepo-simple/packages/post-feature/src/PostError.tsx (1)
1-13: LGTM! Clean error handling component.The component effectively handles the specific PostNotFoundError case while falling back to the generic ErrorComponent for other errors.
examples/solid/router-monorepo-simple/packages/app/src/rootComponent.tsx (1)
1-23: LGTM! Well-structured root component.The component correctly uses Solid.js syntax and integrates the router devtools. The navigation and outlet structure is clean and follows TanStack Router patterns.
examples/solid/router-monorepo-simple/packages/post-feature/src/PostList.tsx (1)
1-34: LGTM! Solid.js component with proper patterns.The component correctly uses Solid.js reactivity patterns (calling
posts()as a function) and demonstrates type-safe navigation with the router. The inclusion of a non-existent post effectively showcases error handling capabilities.examples/solid/router-monorepo-simple/packages/router/src/router.tsx (1)
1-16: Router configuration looks good overall.The router is properly configured with the generated route tree and appropriate default options.
examples/solid/router-monorepo-simple/packages/app/package.json (1)
1-35: Package configuration follows monorepo best practices.The package correctly uses the
workspace:*protocol for internal dependencies and includes appropriate scripts and nx configuration.examples/solid/router-monorepo-simple/packages/post-feature/src/index.ts (1)
1-3: LGTM! Clean barrel exports.The barrel export pattern correctly establishes the public API surface for the post-feature package.
examples/solid/router-monorepo-simple/packages/router/src/index.ts (2)
1-12: LGTM! Solid module augmentation pattern.The type augmentation correctly registers the router instance with
@tanstack/solid-router, enabling type-safe routing across the monorepo.
16-27: LGTM! Well-architected re-export strategy.Re-exporting the TanStack Router API through this package ensures that the type registration is consistently applied across the monorepo. The comment clearly explains the architectural decision.
|
|
||
| export default defineConfig({ | ||
| root: __dirname, | ||
| cacheDir: '../../node_modules/.vite/packages/router', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect cacheDir path.
The cache directory references packages/router but this is the app package configuration. This will cause Vite to use the wrong cache location.
Apply this diff:
- cacheDir: '../../node_modules/.vite/packages/router',
+ cacheDir: '../../node_modules/.vite/packages/app',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| cacheDir: '../../node_modules/.vite/packages/router', | |
| cacheDir: '../../node_modules/.vite/packages/app', |
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/app/vite.config.ts around line
12, the cacheDir is incorrectly set to
'../../node_modules/.vite/packages/router' (points to the router package);
change it to the app package cache path such as
'../../node_modules/.vite/packages/app' so Vite uses the correct cache directory
for this app package.
|
|
||
| export default defineConfig({ | ||
| root: __dirname, | ||
| cacheDir: '../../node_modules/.vite/packages/router', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the cache directory path.
The cacheDir points to packages/router but this configuration is for the post-feature package. This appears to be a copy/paste error and would cause Vite to cache in the wrong location.
Apply this diff to fix the cache directory:
- cacheDir: '../../node_modules/.vite/packages/router',
+ cacheDir: '../../node_modules/.vite/packages/post-feature',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| cacheDir: '../../node_modules/.vite/packages/router', | |
| cacheDir: '../../node_modules/.vite/packages/post-feature', |
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts
around line 12, the cacheDir is incorrectly set to
'../../node_modules/.vite/packages/router' (copy/paste error); update it to
point to this package by changing the path to
'../../node_modules/.vite/packages/post-feature' so Vite caches under the
post-feature folder.
| lib: { | ||
| entry: 'src/index.ts', | ||
| name: 'router', | ||
| fileName: 'index', | ||
| formats: ['es'], | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the library name.
The library name is set to 'router' but this configuration is for the post-feature package. While this primarily affects UMD format (not currently used), it's misleading in an example that users learn from.
Apply this diff to fix the library name:
lib: {
entry: 'src/index.ts',
- name: 'router',
+ name: 'post-feature',
fileName: 'index',
formats: ['es'],
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| lib: { | |
| entry: 'src/index.ts', | |
| name: 'router', | |
| fileName: 'index', | |
| formats: ['es'], | |
| }, | |
| lib: { | |
| entry: 'src/index.ts', | |
| name: 'post-feature', | |
| fileName: 'index', | |
| formats: ['es'], | |
| }, |
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts
around lines 26 to 31, the library name is incorrectly set to 'router'; update
the lib.name to 'post-feature' (the package's actual name) so the build metadata
matches the package and avoids misleading examples; keep the rest of the lib
config unchanged.
| export const fetchPost = async (postId: string) => { | ||
| console.info(`Fetching post with id ${postId}...`) | ||
| await new Promise((r) => setTimeout(r, 500)) | ||
| const post = await axios | ||
| .get<PostType>(`https://jsonplaceholder.typicode.com/posts/${postId}`) | ||
| .then((r) => r.data) | ||
| .catch((err) => { | ||
| if (err.status === 404) { | ||
| throw new PostNotFoundError(`Post with id "${postId}" not found!`) | ||
| } | ||
| throw err | ||
| }) | ||
|
|
||
| return post | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify redaxios error structure for 404 handling.
Ensure that redaxios exposes the status code at err.status rather than err.response.status (as in standard axios). If the error structure differs, the 404 check on line 18 may not work correctly, and errors would be re-thrown without being mapped to PostNotFoundError.
🏁 Script executed:
#!/bin/bash
# Verify redaxios error structure documentation and usage patterns
# Search for redaxios error handling examples in the repository
rg -nP -C3 'redaxios.*catch|catch.*err\.status' --type=ts
# Check package.json for redaxios version
fd -e json package.json --exec grep -H "redaxios"Length of output: 9821
I need to verify the redaxios error structure and examine the target file.
---
🏁 Script executed:
```shell
#!/bin/bash
# Examine the actual target file
cat examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts
Length of output: 858
---
🏁 Script executed:
```shell
#!/bin/bash
# Search for any other error handling with redaxios in the codebase to see patterns
rg -nP -C3 'catch.*err|err\.' examples/solid/router-monorepo-simple/packages/router/src --type=ts | head -50
Length of output: 887
---
🌐 Web query:
```web
redaxios error object structure err.status vs err.response.status
💡 Result:
Short answer: redaxios mimics the Axios API but uses fetch under the hood, so you should read HTTP status from err.response.status (and fall back to other places). In practice check err.response?.status first, then err.status, then err.request?.status (or err.code) as a fallback.
Why / guidance:
- redaxios advertises an Axios‑compatible API (fetch adapter), so error shape is intended to follow Axios semantics (response on server replies). [1]
- Axios documents the error shape: when the server replied the status is on error.response.status; some Axios builds also expose a top‑level error.status on the AxiosError, but that is not always present (network/no‑response errors have no response). Use optional chaining and fallbacks. [2]
Minimal example:
try {
await axios.get('/x');
} catch (err) {
const status = err?.response?.status ?? err?.status ?? err?.request?.status ?? null;
// handle by status
}
Sources:
[1] redaxios (package/README) — redaxios aims to provide the Axios API using fetch.
[2] Axios docs — Handling Errors: response object and recommended access to response.status.
Fix error status check to use err.response?.status for redaxios compatibility.
The error handling on line 18 checks err.status, but redaxios follows Axios semantics where the status code is at err.response.status. The current check will not reliably catch 404 errors. Use err.response?.status ?? err.status to safely access the status with a fallback.
if (err.response?.status === 404 || err.status === 404) {
throw new PostNotFoundError(`Post with id "${postId}" not found!`)
}
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/router/src/fetch/posts.ts
around lines 11 to 25, the error handler checks err.status which misses
redaxios/axios semantics where HTTP status is on err.response.status; update the
check to read the status safely (e.g., use err.response?.status ?? err.status or
explicitly check err.response?.status === 404 || err.status === 404) and throw
PostNotFoundError when that resolved status equals 404; ensure the code uses
optional chaining to avoid accessing response on undefined.
| defaultPendingComponent: () => ( | ||
| <div>Loading form global pending component...</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in loading message.
"Loading form" should be "Loading from".
Apply this diff:
- <div>Loading form global pending component...</div>
+ <div>Loading from global pending component...</div>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| defaultPendingComponent: () => ( | |
| <div>Loading form global pending component...</div> | |
| defaultPendingComponent: () => ( | |
| <div>Loading from global pending component...</div> |
🤖 Prompt for AI Agents
In examples/solid/router-monorepo-simple/packages/router/src/router.tsx around
lines 9 to 10, fix the typo in the loading message by changing "Loading form
global pending component..." to "Loading from global pending component..." so
the text reads correctly; update the JSX string accordingly.
Summary by CodeRabbit
New Features
Documentation