Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] cannot import ts/tsx files in mdx #79

Open
jrson83 opened this issue Oct 4, 2023 · 0 comments
Open

[bug] cannot import ts/tsx files in mdx #79

jrson83 opened this issue Oct 4, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jrson83
Copy link
Collaborator

jrson83 commented Oct 4, 2023

Describe the bug

You cannot import TS/TSX files in your MDXs

It is possible to fix the issue in two ways:

  1. Create mdx.d.ts and include it in tsconfig.json
declare module '*.mdx' {
  let MDXComponent: (props: Record<string, unknown>) => JSX.Element
  export default MDXComponent
}
  1. npm install @types/mdx --save-dev

@itsjavi which do you prefer to integrate in the docs example?

@jrson83 jrson83 self-assigned this Oct 4, 2023
@jrson83 jrson83 added the bug Something isn't working label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant