gatsby-browser.js 425 B

123456789101112131415161718
  1. /**
  2. * Implement Gatsby's Browser APIs in this file.
  3. *
  4. * See: https://www.gatsbyjs.org/docs/browser-apis/
  5. */
  6. // You can delete this file if you're not using it
  7. import './src/styles/global.scss';
  8. import smoothscroll from 'smoothscroll-polyfill';
  9. export const onClientEntry = async () => {
  10. if (typeof IntersectionObserver === 'undefined') {
  11. await import('intersection-observer');
  12. }
  13. smoothscroll.polyfill();
  14. };