hashicorp / next-mdx-enhanced

A Next.js plugin that enables MDX pages, layouts, and front matter
Mozilla Public License 2.0
502 stars 34 forks source link

reExportDataFetching does not work with TypeScript #94

Closed kevinwolfcr closed 3 years ago

kevinwolfcr commented 3 years ago

When I try to use any TypeScript feature (like declaring types) in my layout file, I am getting a Syntax error:

./pages/introduction.mdx:10:5
Syntax error: Unexpected token, expected ";"

   8 | import navItems from '@utils/nav'
   9 | 
> 10 | type LayoutProps = {
     |      ^
  11 |   frontMatter: JamSauceFrontMatter
  12 | }
  13 | 
ericclemmons commented 3 years ago

Why was this closed? I'm also running into this issue with reExportDataFetching.