Skip to content

[Bug]: Type errors for generated type files that correspond to .mdx route files #12362

Open
@lensbart

Description

@lensbart

What version of React Router are you using?

7

Steps to Reproduce

  • Have .mdx file(s) in your routes folder
  • Follow the migration steps to react router 7
  • Run npm run typecheck
  • Observe type errors in the generated type files for the .mdx routes

Expected Behavior

No type errors

Actual Behavior

The generated type files contain a line like

type Module = typeof import("../this-is-an-mdx-file")

The type error is as follows:

Cannot find module '../this-is-an-mdx-file' or its corresponding type declarations.ts(2307)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions