From 1130143bac7057d0a5fc089c6049eef478adcb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Poduszl=C3=B3?= Date: Sun, 21 Mar 2021 14:35:28 +0100 Subject: [PATCH] Add docs on `pageExtensions` for Next Closes GH-28. --- readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index e7f3785..89df518 100644 --- a/readme.md +++ b/readme.md @@ -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: {}}] })