Skip to content

[Bug]: passing props onto .mdx component breaks rendering #1555

Open
@JounQin

Description

Version

System:
OS: macOS 15.1
CPU: (10) arm64 Apple M1 Max
Memory: 5.05 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Browsers:
Chrome: 130.0.6723.92
Safari: 18.1
npmPackages:
@rspress/core: ^1.35.3 => 1.35.3

Details

import Test from '../components/Test.mdx'

<Test />

<Test color="red" />

<Test /> renders normally, <Test color="red" /> results:

Uncaught Error: Expected component `Test` to be defined: you likely forgot to import, pass, or provide it.

https://mdxjs.com/docs/using-mdx/#props

Reproduce link

https://codesandbox.io/p/devbox/xenodochial-david-52cfy2?file=%2Fdocs%2Findex.mdx%3A5%2C21

Reproduce Steps

  1. run npm i && npm dev
  2. check the error logs

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions