Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
fix bug with forcibly removing typescript support
Browse files Browse the repository at this point in the history
  • Loading branch information
jescalan committed Oct 3, 2019
1 parent e4ca821 commit b3df23d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ module.exports = (pluginOptions = {}) => (nextConfig = {}) => {
if (!pluginOptions.layoutPath) pluginOptions.layoutPath = 'layouts'
if (!pluginOptions.fileExtensions) pluginOptions.fileExtensions = ['mdx']

// Set default pageExtensions if not set already
// This extension list should be kept in sync with the NextJS default:
// https://github.com/zeit/next.js/blob/d9abbaded1a443056a5cee68d6bbda6f42057dae/packages/next-server/server/config.ts#L19
if (!nextConfig.pageExtensions) {
nextConfig.pageExtensions = ['jsx', 'js']
nextConfig.pageExtensions = ['jsx', 'js', 'tsx', 'ts']
}

// Add supported file extensions as page extensions so that mdx files are compiled as pages
Expand Down

0 comments on commit b3df23d

Please sign in to comment.