Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

93
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda