Hydration issue with dynamic imports in _app.tsx that may require Turbopack-specific fixes.
The issue involves a hydration error when using dynamic imports in _app.tsx with Turbopack, with reports of double rendering. The problem appears related to specific Next.js versions and may require changes in how Turbopack handles dynamic imports during hydration. The scope is somewhat clear but involves complex interactions between Next.js, React hydration, and Turbopack.
https://github.com/rtrembecky/next-turbopack-hydration-repro
pnpm ipnpm devCurrent behavior:
Expected: No errors.
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10
Binaries:
Node: 24.2.0
npm: 11.4.0
Yarn: 1.22.19
pnpm: 9.15.9
Relevant Packages:
next: 16.0.1-canary.2 // Latest available version is detected (16.0.1-canary.2).
eslint-config-next: N/A
react: 19.2.0
react-dom: 19.2.0
typescript: 5.9.3
Next.js Config:
output: N/A
Pages Router, Module Resolution, Turbopack
next dev (local), next build (local), Other (Deployed)
Pinpointed broken versions:
15.1.1-canary.14, up to 16.0.1-canary.2 (latest at the time of writing)15.2.0Working versions:
15.1.1-canary.1315.1.6Background:
_app.tsx imports a component via next/dynamic - this causes a hydration issue<main> wrapper in _app.tsx is removed or replaced by a <> fragment, the dynamic element is rendered TWICE instead
15.1.1-canary.14, though it apparently broke something: https://github.cClaim this issue to let others know you're working on it. You'll earn 10 points when you complete it!