Dynamic import only works on client page
Unanswered
arig4m3r posted this in #help-forum
arig4m3rOP
Hello, I'm creating a route that should import a client component dynamically, when trying to get this to work, I found out a strange behavior,
Server First Load JS: 430 kB
Client First Load JS: 79.7 kB
next/dynamic seems to only be working on client side components, not at all on servers.Server First Load JS: 430 kB
Client First Load JS: 79.7 kB
6 Replies
Lazy loading applies to Client Components.
@European sprat Lazy loading applies to Client Components.
arig4m3rOP
Yes, but look "Importing Server Components", it has no "use client" at all
European sprat
ah yeah i see that, i'm not sure then
@arig4m3r Yes, but look "Importing Server Components", it has no "use client" at all
arig4m3rOP
What i think that examples shows: It uses a server component to import another server component and optimizes the clients components within this component
@European sprat ah yeah i see that, i'm not sure then
arig4m3rOP
Ok, it's fine, thanks anyway ^^