mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
493a4c1b70
When a server component imports next/dynamic, the RSC serializer must treat it as a client boundary. Without 'use client', the dynamic() function executes inline in the RSC environment — for ssr:false, this serializes null into the RSC payload and the client never loads the component. Adding 'use client' matches Next.js's App Router behavior where next/dynamic is a client module. The RSC serializer emits a client reference, and the client executes the full dynamic logic including the ssr:false mount-on-client behavior. Updated test fixtures that called dynamic() from server modules to include 'use client' — this is required since dynamic() is now a client export and can only be called from client modules. Added E2E test for ssr:false from a server component page.