Skip to content

Commit

Permalink
Add docs on pageExtensions for Next
Browse files Browse the repository at this point in the history
Closes GH-28.
  • Loading branch information
kripod authored Mar 21, 2021
1 parent 4c23da7 commit 1130143
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1404,9 +1404,12 @@ in a `next.config.js` file like so:

```js
module.exports = {
// Support MDX files as pages:
pageExtensions: ['mdx', 'tsx', 'ts', 'jsx', 'js'],
// Support loading `.mdx`:
webpack(config) {
config.module.rules.push({
test: /\.mdx/,
test: /\.mdx$/,
use: [{loader: 'xdm/webpack.cjs', options: {}}]
})

Expand Down

0 comments on commit 1130143

Please sign in to comment.