Next.js Performance & Speed Optimization | Episode #3 | Bundle Size & Budget

Sdílet
Vložit
  • čas přidán 29. 06. 2023
  • Code: github.com/benjaminhaig/next-...
    Need a website? Check us out: fabled-web.ca

Komentáře • 11

  • @NeoCoding
    @NeoCoding Před 2 měsíci

    your info is priceless.. thx

  • @thund3rd3v72
    @thund3rd3v72 Před 5 měsíci

    Thank you very much!!!

  • @rennan9891
    @rennan9891 Před 6 měsíci

    The website my team is building doesn't have a lot of dynamic content, but it has a lot of images that come mostly from Stripe, i don't think using next/dynamic is the better approach, any suggestions? Maybe react memo or using suspense components?

    • @vincentnthomas1
      @vincentnthomas1 Před 2 měsíci +1

      Lazy load images, there’s one built in to html

  • @eghazaryan3335
    @eghazaryan3335 Před 7 měsíci

    How can I optimize analytics scripts to improve site speed score, as they still slow down the website even with the use of the "afterInteractive" property?

  • @FabricioEspinozaMora
    @FabricioEspinozaMora Před 8 měsíci +1

    What is the most optimal way to initialize Firebase in Next.js?

    • @benhaig
      @benhaig  Před 8 měsíci +1

      I would just use the regular initialization process, just dynamically import the package when you need to so it doesn’t ruin your web vitals as the package is massive👍

    • @FabricioEspinozaMora
      @FabricioEspinozaMora Před 8 měsíci +1

      I will try it on my current project, thanks for your response. What I do is to create a firebaseInit.js on root and then import/export getAuth, getAnalytics, getFirestore, initialize(config), this is the regular method?@@benhaig

    • @benhaig
      @benhaig  Před 8 měsíci +2

      Yeah, that's what I mean. Just be careful when you import anything inside of the Firebase npm package in your components. I have managed to get sites to run much faster by just using dynamic imports alone.