is it possible to import mdx into mdx now? #2147
-
i searched for it & found #454 but i also found https://stackoverflow.com/questions/62780010/how-to-include-markdown-file-md-inside-mdx-file even though i'm getting an error:
is it possible to import mdx into mdx? my structure is as follows. this is inside .
├── chapter1
│ └── index.mdx
├── chapter2
│ └── index.mdx
├── cover.png
└── index.mdx
2 directories, 4 files the root it isn't working for some reason. i have imported it in 2 different ways. export { default as cover } from './cover.png'
import Chapter1 from './chapter1/index.mdx'
import Chapter2 from '@/_book/chapter2/index'
<Chapter1 />
this is good shit
<Chapter2 />
end of book is it possible to use something like this? or is the rfc gonna be the solution to this & i'll have to wait? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 49 replies
-
Yes, it should work. If it doesn’t, that’s likely due to your tooling setup. |
Beta Was this translation helpful? Give feedback.
-
the answer is yes & a sample demo → https://github.com/deadcoder0904/mdx-to-pdf-epub-mobi-using-unified/ |
Beta Was this translation helpful? Give feedback.
the answer is yes & a sample demo → https://github.com/deadcoder0904/mdx-to-pdf-epub-mobi-using-unified/