How to Fix 'Reduce Unused JavaScript' from PageSpeed Insights in a Next.js Project on Vercel?
Answered
marmariadev posted this in #help-forum
I need help with reducing unused JavaScript in my Next.js project deployed on Vercel. PageSpeed Insights has identified the file /_next/static/chunks/fd9d1056-cc48c28d170fddc2.js as contributing to the issue. I've reviewed the code but haven't been able to resolve the problem. Does anyone have suggestions for addressing this specific PageSpeed Insights issue in a Next.js environment?
Answered by Marchy
this is likely a 3rd party package, or could be related to how your importing a package. You can use bundle-analyzer to check as well https://nextjs.org/docs/app/building-your-application/optimizing/bundle-analyzer
1 Reply
@marmariadev I need help with reducing unused JavaScript in my Next.js project deployed on Vercel. PageSpeed Insights has identified the file /_next/static/chunks/fd9d1056-cc48c28d170fddc2.js as contributing to the issue. I've reviewed the code but haven't been able to resolve the problem. Does anyone have suggestions for addressing this specific PageSpeed Insights issue in a Next.js environment?
this is likely a 3rd party package, or could be related to how your importing a package. You can use bundle-analyzer to check as well https://nextjs.org/docs/app/building-your-application/optimizing/bundle-analyzer
Answer