Skip to content

Commit

Permalink
Typescript support (#1128)
Browse files Browse the repository at this point in the history
This fucked my brain for like 2 hours so making sure it doesn't happen to anyone else πŸ˜‚
  • Loading branch information
deadcoder0904 authored and wooorm committed Dec 17, 2020
1 parent 790dd15 commit 0d9c6ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/getting-started/next.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,16 @@ module.exports = withMDX({
})
```

### Typescript support

```js
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/
})

module.exports = withMDX({
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx']
})
```

[next-plugin]: https://github.com/vercel/next.js/tree/canary/packages/next-mdx

0 comments on commit 0d9c6ac

Please sign in to comment.