Describe the bug
When importing a component from a index.tsx file in a index.mdx at the same location, it crashes with:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
To Reproduce
$ npx create-docz-app docz-app-typescript --example typescriptsrc/index.tsx (either named export or default export)src/index.mdx toimport Component from './'
// or
import { Component } from './'
<Component />
npm run docz devExpected behavior
It should render the component without any error.
PS: it works fine with javascript files, the error occurs for TS only.
Environment
Additional context/Screenshots

Hi! Sounds like you’ve imported your component as a default export, while it’s only available as a named export.
If you change the import to read import { Component } from ‘./‘, you should be good 👌
@selbekk Both doesn't work. I'll add this in the issue.
It seems the conflict comes from the "common" name, index. If I rename one of the 2 files to something else, it works.
Hm, interesting. Looks like .mdx "takes presedence" over .tsx. This is probably due to the fact that Docz specifies the markdown plugin before the typescript plugin. If you specify the full ./index.tsx, it works though :)
Most helpful comment
Hm, interesting. Looks like
.mdx"takes presedence" over.tsx. This is probably due to the fact that Docz specifies the markdown plugin before the typescript plugin. If you specify the full./index.tsx, it works though :)