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
7790f72f
Unverified
Commit
7790f72f
authored
May 06, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
May 06, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run export child process with runtime's default `max-old-space-size` (#78712)
parent
4cde29ca
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
6 deletions
+11
-6
index.ts
packages/next/src/build/index.ts
+3
-1
index.ts
packages/next/src/build/turbopack-build/index.ts
+0
-1
index.ts
packages/next/src/build/webpack-build/index.ts
+0
-1
worker.ts
packages/next/src/lib/worker.ts
+8
-3
No files found.
packages/next/src/build/index.ts
View file @
7790f72f
...
@@ -764,7 +764,9 @@ export function createStaticWorker(
...
@@ -764,7 +764,9 @@ export function createStaticWorker(
progress
?.
clear
()
progress
?.
clear
()
},
},
forkOptions
:
{
forkOptions
:
{
env
:
{
...
process
.
env
,
NODE_OPTIONS
:
formatNodeOptions
(
nodeOptions
)
},
env
:
{
NODE_OPTIONS
:
formatNodeOptions
(
nodeOptions
),
},
},
},
enableWorkerThreads
:
config
.
experimental
.
workerThreads
,
enableWorkerThreads
:
config
.
experimental
.
workerThreads
,
exposedMethods
:
staticWorkerExposedMethods
,
exposedMethods
:
staticWorkerExposedMethods
,
...
...
packages/next/src/build/turbopack-build/index.ts
View file @
7790f72f
...
@@ -16,7 +16,6 @@ async function turbopackBuildWithWorker() {
...
@@ -16,7 +16,6 @@ async function turbopackBuildWithWorker() {
maxRetries
:
0
,
maxRetries
:
0
,
forkOptions
:
{
forkOptions
:
{
env
:
{
env
:
{
...
process
.
env
,
NEXT_PRIVATE_BUILD_WORKER
:
'1'
,
NEXT_PRIVATE_BUILD_WORKER
:
'1'
,
NODE_OPTIONS
:
formatNodeOptions
(
nodeOptions
),
NODE_OPTIONS
:
formatNodeOptions
(
nodeOptions
),
},
},
...
...
packages/next/src/build/webpack-build/index.ts
View file @
7790f72f
...
@@ -57,7 +57,6 @@ async function webpackBuildWithWorker(
...
@@ -57,7 +57,6 @@ async function webpackBuildWithWorker(
maxRetries
:
0
,
maxRetries
:
0
,
forkOptions
:
{
forkOptions
:
{
env
:
{
env
:
{
...
process
.
env
,
NEXT_PRIVATE_BUILD_WORKER
:
'1'
,
NEXT_PRIVATE_BUILD_WORKER
:
'1'
,
NODE_OPTIONS
:
formatNodeOptions
(
nodeOptions
),
NODE_OPTIONS
:
formatNodeOptions
(
nodeOptions
),
},
},
...
...
packages/next/src/lib/worker.ts
View file @
7790f72f
...
@@ -2,7 +2,7 @@ import type { ChildProcess } from 'child_process'
...
@@ -2,7 +2,7 @@ import type { ChildProcess } from 'child_process'
import
{
Worker
as
JestWorker
}
from
'next/dist/compiled/jest-worker'
import
{
Worker
as
JestWorker
}
from
'next/dist/compiled/jest-worker'
import
{
Transform
}
from
'stream'
import
{
Transform
}
from
'stream'
type
FarmOptions
=
ConstructorParameters
<
typeof
JestWorker
>
[
1
]
type
FarmOptions
=
NonNullable
<
ConstructorParameters
<
typeof
JestWorker
>
[
1
]
>
const
RESTARTED
=
Symbol
(
'restarted'
)
const
RESTARTED
=
Symbol
(
'restarted'
)
...
@@ -19,7 +19,12 @@ export class Worker {
...
@@ -19,7 +19,12 @@ export class Worker {
constructor
(
constructor
(
workerPath
:
string
,
workerPath
:
string
,
options
:
FarmOptions
&
{
options
:
Omit
<
FarmOptions
,
'forkOptions'
>
&
{
forkOptions
?:
|
(
Omit
<
NonNullable
<
FarmOptions
[
'forkOptions'
]
>
,
'env'
>
&
{
env
?:
Partial
<
NodeJS
.
ProcessEnv
>
|
undefined
})
|
undefined
timeout
?:
number
timeout
?:
number
onActivity
?:
()
=>
void
onActivity
?:
()
=>
void
onActivityAbort
?:
()
=>
void
onActivityAbort
?:
()
=>
void
...
@@ -48,8 +53,8 @@ export class Worker {
...
@@ -48,8 +53,8 @@ export class Worker {
forkOptions
:
{
forkOptions
:
{
...
farmOptions
.
forkOptions
,
...
farmOptions
.
forkOptions
,
env
:
{
env
:
{
...((
farmOptions
.
forkOptions
?.
env
||
{})
as
any
),
...
process
.
env
,
...
process
.
env
,
...((
farmOptions
.
forkOptions
?.
env
||
{})
as
any
),
IS_NEXT_WORKER
:
'true'
,
IS_NEXT_WORKER
:
'true'
,
}
as
any
,
}
as
any
,
},
},
...
...
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