Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

98
Vistas
Next.js sends duplicate (redundant) chunks

I experience an issue in my web app, where 80% of the .js chunks are loaded twice, redundantly without a clear reason.

Clearly this increases TTI and hits my Lighthouse score.

These dups are identical in Name, Path and Size. They differ in Initiator and Type (javascript and not script), as seen in this image:

enter image description here

Looks like this issue has been reported already (e.g. here and here), but it's not clear if Vercel addresses the problem in these bug reports.

When following this suggestion to disable link prefetch I did manage to see the problem go away, but so did the prefetch (which still works on hover).

Is there anything I could do differently to benefit from Next's link prefetch while not experiencing these redundant .js chunks?

Is this addressed in Next.js version 12?

More info about my setup:

  • Next.js version 10.2.3.
  • React version 16.12.0.
  • Serving statically from AWS S3.
  • Rendering everything on the client side.
  • Code splitting to .js chunks is made by Next.js, and I'm using the default route based (/pages) code splitting. No dynamic import is used at this point.

More info about the issue:

  • It does not repro when you refresh page, since browser caches these chunks.
  • No repro on Firefox.
  • Seems like it’s happening in version 11 too. Also 10 and 9, but not 8.
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda