Skip to content

Nested lazy route discovery does not work with a splat route at top. #14425

@vkbansal-rubrik

Description

@vkbansal-rubrik

Reproduction

Here is code to reproduce the issue https://github.com/vkbansal-rubrik/react-router-nested-lazy-children

If you navigate to App1 > Product1 and refresh the page, Not Found is rendered.

If the entry for path: "*" is removed from main.jsx, then the page works even after refresh.

The issue is not exactly reproducible on stackblitz. It's reproducible locally.

System Info

System:
    OS: macOS 15.6.1
    CPU: (12) arm64 Apple M3 Pro
    Memory: 105.47 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2
    Yarn: 1.22.17
    npm: 10.5.0
    pnpm: 10.2.1
    bun: 1.2.22
  Browsers:
    Chrome: 140.0.7339.214
    Firefox: 142.0.1
    Safari: 18.6
  npmPackages:
    vite: ^7.1.9 => 7.1.9

Used Package Manager

pnpm

Expected Behavior

Correct page should be rendered

Actual Behavior

Not found is rendered

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions