2 years ago
#330850
Pinnci
imported .mdx files does not get styles for inline-code and code previews
I ran into a problem / bug, when you import .mdx file inside another .mdx file, then imported file does not get styles for inline-code and code preview.
Text is displayed, also headings are formatted but styles for these 2 specific things are not.
What I mean by that is this:
File1
//File1.docs.mdx
import File2 from './file2.docs.mdx';
# Some heading in File1
Some text1
<File2 />
File2
//File2.docs.mdx
## Some heading in File2
Some `inline-code` preview in File2
```js
Some code preview in File2
```
Here is picture, with output. As you can see, text is correctly placed between <code> tags, but there is no class / style, which is supposed to style this preview.

This problem happens only in imported file (File2), while in File1 everything works just fine.
Have you ever encountered this kind of problem?
I'm using @mdx-js/loader: "~2.0.0"
mdxjs
0 Answers
Your Answer