From ae4e2b5dd0e02f45d75f68e8f0242f3e3ef28eb2 Mon Sep 17 00:00:00 2001 From: Abhay Yadav Date: Thu, 19 Mar 2026 20:16:06 +0530 Subject: [PATCH] fix: detect Bun runtime automatically when not explicitly configured --- packages/cli-v3/src/config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli-v3/src/config.ts b/packages/cli-v3/src/config.ts index af5623e0176..9cfe2fe1063 100644 --- a/packages/cli-v3/src/config.ts +++ b/packages/cli-v3/src/config.ts @@ -191,7 +191,8 @@ async function resolveConfig( ["run_engine_v2" as const].concat(config.compatibilityFlags ?? []) ); - const defaultRuntime: BuildRuntime = features.run_engine_v2 ? "node" : DEFAULT_RUNTIME; + const detectedRuntime: BuildRuntime = typeof process.versions.bun === "string" ? "bun" : "node"; + const defaultRuntime: BuildRuntime = config.runtime ?? detectedRuntime; const mergedConfig = defu( {