From 340b49c5711725d48694b83058fe027e6de693b0 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Wed, 14 Feb 2018 17:52:11 +0100 Subject: [PATCH] Document pageExtensions --- readme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/readme.md b/readme.md index 7cae3b20..0700967a 100644 --- a/readme.md +++ b/readme.md @@ -1037,6 +1037,17 @@ module.exports = { This is development-only feature. If you want to cache SSR pages in production, please see [SSR-caching](https://github.com/zeit/next.js/tree/canary/examples/ssr-caching) example. +#### Configuring extensions looked for when resolving pages in `pages` + +Aimed at modules like [`@zeit/next-typescript`](https://github.com/zeit/next-plugins/tree/master/packages/next-typescript), that add support for pages ending in `.ts`. `pageExtensions` allows you to configure the extensions looked for in the `pages` directory when resolving pages. + +```js +// next.config.js +module.exports = { + pageExtensions: ['jsx', 'js'] +} +``` + ### Customizing webpack config