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

230
Visualizações
Why my nextjs app doesn't work on Safari?

I'm developing a web app using nextjs. Everything works just fine on every browser, except for Safari on Mac. This is what I got when I open the developer console:

enter image description here

Only on Mac that this is happening, it can still run normally on an iPhone. Does anyone have an idea why this is happening?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The IntersectionObserver API is not available on Safari v3.1-12. Either you or any of your libraries is using this API. To make it work on older versions of Safari, you need to polyfill it. Something like this should do the job for Safari v6+:

// pages/_app.jsx

import Script from 'next/script';

const App = ({ Component, pageProps }) => (
  <>
    <Script
      src="https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver"
      strategy="beforeInteractive"
    />
    <Component {...pageProps} />
  </>
);

export default App;

References:

  • https://caniuse.com/intersectionobserver
  • https://nextjs.org/docs/basic-features/supported-browsers-features#custom-polyfills
  • https://github.com/w3c/IntersectionObserver/tree/main/polyfill
  • https://nextjs.org/docs/basic-features/script#loading-polyfills
  • https://nextjs.org/docs/advanced-features/custom-app
about 4 years ago · Juan Pablo Isaza Relatório
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