Closed
Description
🐛 Bug Report
- I want to render Accordion component in a
.mdx
file. - for example, write documentation for Accordion in
.mdx
🤔 Expected Behavior
Accordion
component inhello.mdx
should be rendered in theApp
.
😯 Current Behavior
-
simplifed demo
-
if Accordion in
hello.mdx
is commented, rendering works.- Button can render in both index.js and hello.mdx.
- Accordion can render in index.js, but not in hello.mdx.
-
if Accordion in
hello.mdx
is not commented, build fails.
error message in the console:
module.js:241
Uncaught Error: Unknown element <[object Object]> in collection.
at $f8429209754fda4b9142d514065f4$export$CollectionBuilder.getFullNode (module.js:241)
at getFullNode.next (<anonymous>)
at $f8429209754fda4b9142d514065f4$export$CollectionBuilder.iterateCollection (module.js:177)
at iterateCollection.next (<anonymous>)
at Object.[Symbol.iterator] (module.js:351)
at Generator.next (<anonymous>)
at new $afa6f708e32ecf7f97d9a58dfd59c$export$TreeCollection (module.js:51)
💁 Possible Solution
🔦 Context
💻 Code Sample
- https://github.com/examples-hub/issue-react-spectrum-mdx-collection-build-error
- mdx is loaded with webpack and @mdx-js/loader
🌍 Your Environment
Software | Version(s) |
---|---|
react-spectrum | latest |
Browser | |
Operating System |
🧢 Your Company/Team
🕷 Tracking Issue (optional)
Metadata
Metadata
Assignees
Labels
No labels