You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: detect Turbopack builds and set TURBOPACK env accordingly
When building with Turbopack (default in Next.js 16), the standalone output
only includes *-turbo.runtime.prod.js files, not the webpack variants. The
previous behavior of unconditionally setting TURBOPACK=false caused runtime
errors because module.compiled.js would try to load non-existent runtime files.
This change:
- Detects Turbopack builds by checking if only turbo runtime files exist in
the traced files
- Sets TURBOPACK=true for Turbopack builds so the correct runtime is loaded
- Keeps TURBOPACK=false for Webpack builds (existing behavior)
Fixes runtime error: Cannot find module 'next/dist/compiled/next-server/pages.runtime.prod.js'
0 commit comments