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:
parent
1424b84c98
commit
3eac0bc35d
|
@ -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
|
||||
|
|
|
@ -10,7 +10,8 @@ const defaultConfig = {
|
|||
distDir: '.next',
|
||||
assetPrefix: '',
|
||||
configOrigin: 'default',
|
||||
useFileSystemPublicRoutes: true
|
||||
useFileSystemPublicRoutes: true,
|
||||
pagesGlobPattern: 'pages/**/*.js'
|
||||
}
|
||||
|
||||
export default function getConfig (dir, customConfig) {
|
||||
|
|
Loading…
Reference in a new issue