Skip to content

basepath handling is broken in v1.132.x #5221

@jakst

Description

@jakst

Which project does this relate to?

Router

Describe the bug

Basepath handling is broken after upgrading to the new RC version.

With basepath set to /app, and the two routes routes/index.tsx and routes/sub.tsx:

  • Navigating to /app in the browser 404s
  • Navigating to /app/sub in the browser works
  • Navigating from /app/sub to /app with <Link to="/"> works, but the URL is now /app/app.
  • Navigating from /app/app to /app/sub with <Link to="/sub"> works, but the URL is now /app/app/sub.

So there seems be a regression in the basepath handling logic.

Your Example Website or App

https://github.com/jakst/solid-start-solid-rc-broken/tree/basepath

Steps to Reproduce the Bug or Issue

  1. Clone the repo (make sure you clone from the basepath branch)
  2. Start dev server and open the app
  3. You'll be met by a 404 on first visit to /app
  4. Try clicking around and notice the double /app/app URLs

Expected behavior

I expect basepath handling to work like in v1.131.x

Screenshots or Videos

No response

Platform

  • Router / Start Version: v1.131.6
  • OS: MacOS
  • Browser: Chrome
  • Browser Version: 140
  • Bundler: vite
  • Bundler Version: 7.1.7

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions