Skip to content

Commit c2a2752

Browse files
authored
Turbopack: Revert default loader runtime backend to child processes (#90675)
We're getting crashes in node: https://github.com/vercel/workflow/actions/runs/22500511618/job/65186125774#step:10:224 It looks like this should be fixed in newer versions of node: - napi-rs/napi-rs#2555 (comment) - nodejs/node#55877 - nodejs/node#61400 - nodejs/node#61661 So we may enable the worker threads feature by default if we detect a new enough version of node or bun.
1 parent c5b2cf1 commit c2a2752

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

crates/next-core/src/next_config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,10 +2059,10 @@ impl NextConfig {
20592059

20602060
#[turbo_tasks::function]
20612061
pub fn turbopack_plugin_runtime_strategy(&self) -> Vc<TurbopackPluginRuntimeStrategy> {
2062-
#[cfg(feature = "worker_pool")]
2063-
let default = TurbopackPluginRuntimeStrategy::WorkerThreads;
2064-
#[cfg(all(not(feature = "worker_pool"), feature = "process_pool"))]
2062+
#[cfg(feature = "process_pool")]
20652063
let default = TurbopackPluginRuntimeStrategy::ChildProcesses;
2064+
#[cfg(all(feature = "worker_pool", not(feature = "process_pool")))]
2065+
let default = TurbopackPluginRuntimeStrategy::WorkerThreads;
20662066

20672067
self.experimental
20682068
.turbopack_plugin_runtime_strategy

packages/next/src/server/config-shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1722,7 +1722,7 @@ export const defaultConfig = Object.freeze({
17221722
turbopackFileSystemCacheForDev: true,
17231723
turbopackFileSystemCacheForBuild: false,
17241724
turbopackInferModuleSideEffects: true,
1725-
turbopackPluginRuntimeStrategy: 'workerThreads',
1725+
turbopackPluginRuntimeStrategy: 'childProcesses',
17261726
devCacheControlNoCache: false,
17271727
},
17281728
htmlLimitedBots: undefined,

0 commit comments

Comments
 (0)