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 committed Jul 15, 2020
1 parent de8188a commit 075a3c4
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 075a3c4

Please sign in to comment.