From a5cc116397b9bfceec8f692f07a377d66cf58887 Mon Sep 17 00:00:00 2001 From: backryun Date: Sun, 28 Jun 2026 15:09:30 +0900 Subject: [PATCH] fix(cli): default dev bundler to Turbopack (16.2.x panic no longer reproduces) (#5206) Integrated into release/v3.8.39 --- .env.example | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index 9e11926efe..ba7e330569 100644 --- a/.env.example +++ b/.env.example @@ -111,13 +111,19 @@ PORT=20128 # Used by: src/app/api/v1/relay/chat/completions/route.ts # RELAY_IP_PER_MINUTE=30 -# Bundler selection for `npm run dev`. Set to 1 to opt into Turbopack. -# Default is 0 (webpack) because Turbopack 16.2.x panics on the OmniRoute -# module graph with "internal error: entered unreachable code: there must be -# a path to a root" (turbopack-core/module_graph/mod.rs:662). Same bug class -# the production Docker build worked around in PR #4052. Webpack starts -# slower but compiles cleanly. Re-enable once upstream Turbopack ships a fix. -OMNIROUTE_USE_TURBOPACK=0 +# Bundler selection for `npm run dev`. Set to 0 to fall back to webpack. +# Default is 1 (Turbopack). PR #4092 had forced webpack because earlier +# Turbopack 16.2.x panicked on the OmniRoute module graph with "internal error: +# entered unreachable code: there must be a path to a root" +# (turbopack-core/module_graph/mod.rs:662). That panic no longer reproduces on +# the pinned Next 16.2.9 — verified across a broad cold-compile sweep (36 +# dashboard routes + open-sse-heavy API routes incl. /api/v1/chat/completions, +# /api/v1/models, /api/mcp) and repeated HMR rebuilds: zero panics. Turbopack +# also keeps dev memory far lower on the edit→rebuild loop (HMR rebuild RSS stays +# ~flat vs webpack's monotonic growth), which mitigates the dev-server OOM on +# this 60+ route app. The production build still uses webpack (build pipeline is +# unaffected by this dev-only flag). +OMNIROUTE_USE_TURBOPACK=1 # Skip the SQLite integrity health check on startup (faster boot on large DBs). # Used by: src/lib/db/core.ts, src/lib/db/healthCheck.ts. Set to 1 to skip.