1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Make pages glob pattern overridable (#3195)

This commit is contained in:
Mattias Hällkvist 2017-11-05 22:27:31 +01:00 committed by Tim Neutkens
parent 1424b84c98
commit 3eac0bc35d
2 changed files with 3 additions and 2 deletions

View file

@ -49,7 +49,7 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet
]
}
const pages = await glob('pages/**/*.js', { cwd: dir })
const pages = await glob(config.pagesGlobPattern, { cwd: dir })
const devPages = pages.filter((p) => p === 'pages/_document.js' || p === 'pages/_error.js')
// In the dev environment, on-demand-entry-handler will take care of

View file

@ -10,7 +10,8 @@ const defaultConfig = {
distDir: '.next',
assetPrefix: '',
configOrigin: 'default',
useFileSystemPublicRoutes: true
useFileSystemPublicRoutes: true,
pagesGlobPattern: 'pages/**/*.js'
}
export default function getConfig (dir, customConfig) {