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
30da9e07
Commit
30da9e07
authored
Jul 09, 2019
by
JJ Kasper
Committed by
Tim Neutkens
Jul 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to always require next/config when setting config (#7822)
parent
432eec2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
utils.ts
packages/next/build/utils.ts
+2
-3
No files found.
packages/next/build/utils.ts
View file @
30da9e07
...
@@ -15,7 +15,6 @@ import { getPageChunks } from './webpack/plugins/chunk-graph-plugin'
...
@@ -15,7 +15,6 @@ import { getPageChunks } from './webpack/plugins/chunk-graph-plugin'
const
fsStat
=
promisify
(
fs
.
stat
)
const
fsStat
=
promisify
(
fs
.
stat
)
const
fsExists
=
promisify
(
fs
.
exists
)
const
fsExists
=
promisify
(
fs
.
exists
)
const
fsReadFile
=
promisify
(
fs
.
readFile
)
const
fsReadFile
=
promisify
(
fs
.
readFile
)
const
nextEnvConfig
=
require
(
'next-server/config'
)
export
function
collectPages
(
export
function
collectPages
(
directory
:
string
,
directory
:
string
,
...
@@ -268,7 +267,7 @@ export function isPageStatic(
...
@@ -268,7 +267,7 @@ export function isPageStatic(
runtimeEnvConfig
:
any
runtimeEnvConfig
:
any
):
{
static
?:
boolean
;
prerender
?:
boolean
}
{
):
{
static
?:
boolean
;
prerender
?:
boolean
}
{
try
{
try
{
nextEnvConfig
.
setConfig
(
runtimeEnvConfig
)
require
(
'next-server/config'
)
.
setConfig
(
runtimeEnvConfig
)
const
mod
=
require
(
serverBundle
)
const
mod
=
require
(
serverBundle
)
const
Comp
=
mod
.
default
const
Comp
=
mod
.
default
...
@@ -290,7 +289,7 @@ export function hasCustomAppGetInitialProps(
...
@@ -290,7 +289,7 @@ export function hasCustomAppGetInitialProps(
_appBundle
:
string
,
_appBundle
:
string
,
runtimeEnvConfig
:
any
runtimeEnvConfig
:
any
):
boolean
{
):
boolean
{
nextEnvConfig
.
setConfig
(
runtimeEnvConfig
)
require
(
'next-server/config'
)
.
setConfig
(
runtimeEnvConfig
)
let
mod
=
require
(
_appBundle
)
let
mod
=
require
(
_appBundle
)
if
(
_appBundle
.
endsWith
(
'_app.js'
))
{
if
(
_appBundle
.
endsWith
(
'_app.js'
))
{
...
...
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