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
5a5f0d00
Unverified
Commit
5a5f0d00
authored
Jun 02, 2021
by
Tim Neutkens
Committed by
GitHub
Jun 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable serial build by default (#25642)
parent
9c3780fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
28 deletions
+18
-28
index.ts
packages/next/build/index.ts
+18
-26
config-shared.ts
packages/next/next-server/server/config-shared.ts
+0
-2
No files found.
packages/next/build/index.ts
View file @
5a5f0d00
...
@@ -543,33 +543,25 @@ export default async function build(
...
@@ -543,33 +543,25 @@ export default async function build(
const
webpackBuildStart
=
process
.
hrtime
()
const
webpackBuildStart
=
process
.
hrtime
()
let
result
:
CompilerResult
=
{
warnings
:
[],
errors
:
[]
}
let
result
:
CompilerResult
=
{
warnings
:
[],
errors
:
[]
}
// We run client and server compilation separately when configured for
// We run client and server compilation separately to optimize for memory usage
// memory constraint and for serverless to be able to load manifests
await
nextBuildSpan
// produced in the client build
.
traceChild
(
'run-webpack-compiler'
)
if
(
isLikeServerless
||
config
.
experimental
.
serialWebpackBuild
)
{
.
traceAsyncFn
(
async
()
=>
{
await
nextBuildSpan
const
clientResult
=
await
runCompiler
(
clientConfig
)
.
traceChild
(
'run-webpack-compiler'
)
// Fail build if clientResult contains errors
.
traceAsyncFn
(
async
()
=>
{
if
(
clientResult
.
errors
.
length
>
0
)
{
const
clientResult
=
await
runCompiler
(
clientConfig
)
result
=
{
// Fail build if clientResult contains errors
warnings
:
[...
clientResult
.
warnings
],
if
(
clientResult
.
errors
.
length
>
0
)
{
errors
:
[...
clientResult
.
errors
],
result
=
{
warnings
:
[...
clientResult
.
warnings
],
errors
:
[...
clientResult
.
errors
],
}
}
else
{
const
serverResult
=
await
runCompiler
(
configs
[
1
])
result
=
{
warnings
:
[...
clientResult
.
warnings
,
...
serverResult
.
warnings
],
errors
:
[...
clientResult
.
errors
,
...
serverResult
.
errors
],
}
}
}
})
}
else
{
}
else
{
const
serverResult
=
await
runCompiler
(
configs
[
1
])
result
=
await
nextBuildSpan
result
=
{
.
traceChild
(
'run-webpack-compiler'
)
warnings
:
[...
clientResult
.
warnings
,
...
serverResult
.
warnings
],
.
traceAsyncFn
(()
=>
runCompiler
(
configs
))
errors
:
[...
clientResult
.
errors
,
...
serverResult
.
errors
],
}
}
}
})
const
webpackBuildEnd
=
process
.
hrtime
(
webpackBuildStart
)
const
webpackBuildEnd
=
process
.
hrtime
(
webpackBuildStart
)
if
(
buildSpinner
)
{
if
(
buildSpinner
)
{
...
...
packages/next/next-server/server/config-shared.ts
View file @
5a5f0d00
...
@@ -50,7 +50,6 @@ export type NextConfig = { [key: string]: any } & {
...
@@ -50,7 +50,6 @@ export type NextConfig = { [key: string]: any } & {
scriptLoader
?:
boolean
scriptLoader
?:
boolean
stats
?:
boolean
stats
?:
boolean
externalDir
?:
boolean
externalDir
?:
boolean
serialWebpackBuild
?:
boolean
conformance
?:
boolean
conformance
?:
boolean
amp
?:
{
amp
?:
{
optimizer
?:
any
optimizer
?:
any
...
@@ -115,7 +114,6 @@ export const defaultConfig: NextConfig = {
...
@@ -115,7 +114,6 @@ export const defaultConfig: NextConfig = {
scriptLoader
:
false
,
scriptLoader
:
false
,
stats
:
false
,
stats
:
false
,
externalDir
:
false
,
externalDir
:
false
,
serialWebpackBuild
:
false
,
turboMode
:
false
,
turboMode
:
false
,
eslint
:
false
,
eslint
:
false
,
reactRoot
:
Number
(
process
.
env
.
NEXT_PRIVATE_REACT_ROOT
)
>
0
,
reactRoot
:
Number
(
process
.
env
.
NEXT_PRIVATE_REACT_ROOT
)
>
0
,
...
...
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