Next.js Discord

Discord Forum

suggestions on optimizing First Load JS

Unanswered
Naeemgg posted this in #help-forum
Open in Discord
what are the best practices to reduce the First Load js, I encounter the size in yellow(140kb+) or sometimes even in red (600kb+)

Note: Route (app)

4 Replies

move unecessary client components up into server-side rendering
Yes I know but almost 90% of my code is written in canvas
And I can't use canvas with server side rendering
Then it is impossible to reduce the size unless you remove these canvases. But usually the heavily first load js size is caused by libraries, where you can replace them with lightweight alternatives