Skip to content

Commit ae4e2b5

Browse files
Abhay YadavAbhay Yadav
authored andcommitted
fix: detect Bun runtime automatically when not explicitly configured
1 parent 35298ac commit ae4e2b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/cli-v3/src/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ async function resolveConfig(
191191
["run_engine_v2" as const].concat(config.compatibilityFlags ?? [])
192192
);
193193

194-
const defaultRuntime: BuildRuntime = features.run_engine_v2 ? "node" : DEFAULT_RUNTIME;
194+
const detectedRuntime: BuildRuntime = typeof process.versions.bun === "string" ? "bun" : "node";
195+
const defaultRuntime: BuildRuntime = config.runtime ?? detectedRuntime;
195196

196197
const mergedConfig = defu(
197198
{

0 commit comments

Comments
 (0)