Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3eac0bc3
Commit
3eac0bc3
authored
Nov 05, 2017
by
Mattias Hällkvist
Committed by
Tim Neutkens
Nov 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make pages glob pattern overridable (#3195)
parent
1424b84c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
webpack.js
server/build/webpack.js
+1
-1
config.js
server/config.js
+2
-1
No files found.
server/build/webpack.js
View file @
3eac0bc3
...
@@ -49,7 +49,7 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet
...
@@ -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'
)
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
// In the dev environment, on-demand-entry-handler will take care of
...
...
server/config.js
View file @
3eac0bc3
...
@@ -10,7 +10,8 @@ const defaultConfig = {
...
@@ -10,7 +10,8 @@ const defaultConfig = {
distDir
:
'.next'
,
distDir
:
'.next'
,
assetPrefix
:
''
,
assetPrefix
:
''
,
configOrigin
:
'default'
,
configOrigin
:
'default'
,
useFileSystemPublicRoutes
:
true
useFileSystemPublicRoutes
:
true
,
pagesGlobPattern
:
'pages/**/*.js'
}
}
export
default
function
getConfig
(
dir
,
customConfig
)
{
export
default
function
getConfig
(
dir
,
customConfig
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment