Skip to content

routeDiscovery is undefined even explicitly specified #24

@yf-yang

Description

@yf-yang

Reproduction: https://github.com/yf-yang/rsbuild-react-router-bug (This is just a copy of the default-template, with all packages updated to latest)

To reproduce:

pnpm i
pnpm dev
// open localhost:3000 and got an internal error

error message: TypeError: Cannot read properties of undefined (reading 'manifestPath')

That's because RR7.6 introduced a new config routeDiscovery. However, I cannot easily figure out what's the package that triggers the issue. Simply bumping RR to 7.6 and rsbuild/core to latest (1.3.18) cannot trigger the error.

react-router.config.ts:

import type { Config } from "@react-router/dev/config";

export default {
  // Config options...
  // Server-side render by default, to enable SPA mode set this to `false`
  ssr: true,
  routeDiscovery: { mode: "initial" },
} satisfies Config;

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