I'm trying to improve my site performance and the Google Chrome Lighthouse tells me to use loadable-components for ssr in order to "remove unused javascript".
What I found in the doc is it seems to be a library with useful functions for my case, eg: component splitting/ loading library.
My question is:
Thank you!
By default, Next.js splits your JavaScript into separate chunks for each route. So when users load your application, Next.js only sends the code needed for the initial route.
You can further optimize the loading process with code splitting on the component level using inbuilt next/dynamic
Refer code splitting with dynamic imports for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With