Skip to content

Conversation

@andorep
Copy link

@andorep andorep commented Oct 9, 2025

rewriteBasepath is missing from the exports of react router

Summary by CodeRabbit

  • New Features
    • Expanded public API with a new router helper for base-path rewrites, making URL base-path customization easier.
    • Existing rewrite composition capability remains available and unchanged.
    • No breaking changes; apps continue to work as before and can adopt the new helper incrementally without config updates.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Walkthrough

Two packages expose a new symbol: rewriteBasepath was added to packages/router-core exports and re-exported from packages/react-router public index. No behavior or control flow changes were introduced.

Changes

Cohort / File(s) Summary
router-core exports
packages/router-core/src/index.ts
Added export of rewriteBasepath from ./rewrite, increasing the public API surface.
react-router re-exports
packages/react-router/src/index.tsx
Re-exported rewriteBasepath from @tanstack/router-core alongside existing composeRewrites.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • schiller-manuel

Poem

I nibble through paths with tidy delight,
A hop, a skip—new exports in sight! 🐇
composeRewrites waits, its partner joins fast,
rewriteBasepath hops in at last.
Small changes, neat burrows—public API made bright.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly summarizes the main change by indicating that the missing rewriteBasepath function is being exported, which directly reflects the core objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce9c7f0 and 9821c7a.

📒 Files selected for processing (1)
  • packages/router-core/src/index.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/router-core/src/index.ts
packages/router-core/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep framework-agnostic core router logic in packages/router-core/

Files:

  • packages/router-core/src/index.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: TanStack/router#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/
🔇 Additional comments (1)
packages/router-core/src/index.ts (1)

438-443: LGTM: rewriteBasepath export verified.


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

❤️ Share

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

@schiller-manuel
Copy link
Contributor

no this function is not meant for external consumption.

@andorep
Copy link
Author

andorep commented Oct 10, 2025

@schiller-manuel Sorry about that, I thought this was still the way to do the base_url configuration from vite.

Is there a doc where I can check that?

If not, I probably could help with more documentation about that, if you just point me to the right direction to start, I can go from there myself

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants