Faster Nuxt Builds? 🤔 No problem ✅

Поделиться
HTML-код
  • Опубликовано: 2 ноя 2024

Комментарии • 39

  • @TheAlexLichter
    @TheAlexLichter  Месяц назад

    IMPORTANT: This feature is now an experimental flag that is built into Nuxt. See nuxt.com/docs/guide/going-further/experimental-features#buildcache for more.

  • @Gaijin101
    @Gaijin101 7 месяцев назад +19

    Yes, nuxt testing please 🙏

    • @alimaher1
      @alimaher1 7 месяцев назад +1

      I second this.

    • @DavidDeSloovere
      @DavidDeSloovere 7 месяцев назад +1

      I would move to see PlayWright integration in nuxt test/vitest.

    • @TheFlyer1983
      @TheFlyer1983 7 месяцев назад +1

      Yes, would also love to see some Testing Videos, although this could be a very big topic. Vitest, nuxt/test-utils vue/test-utils

    • @epiphanyatnight8732
      @epiphanyatnight8732 7 месяцев назад

      Pretty please!

    • @januarfonti
      @januarfonti 7 месяцев назад

      +1

  • @MGJoe93
    @MGJoe93 7 месяцев назад +2

    Great video. Thanks for digging into the code. I would like to see more of this :)

    • @TheAlexLichter
      @TheAlexLichter  7 месяцев назад

      You are welcome!
      More deep dives into code you mean?

  • @DavidDeSloovere
    @DavidDeSloovere 7 месяцев назад +4

    Modules are so powerful, but also bit complicated. Layers are simple and effective.
    I find it difficult to choose. There seems to be more emphasis on modules, ie modules gallery on the nuxt site. And less about layers.
    Maybe something for a future video?

    • @TheAlexLichter
      @TheAlexLichter  7 месяцев назад +1

      Great idea! Layers vs. modules listed. But first, let's talk about what layers are 👀

  • @РодионГаврилов-ч9ж
    @РодионГаврилов-ч9ж 7 месяцев назад +4

    what about dev mode speed?) nuxtUI + nuxt3 seems to be very slow(

  • @KefiVitcH
    @KefiVitcH 7 месяцев назад

    Oh yeah... better voice quality now ! i laughted at the testing moment 😂😂

  • @Saeid-Za
    @Saeid-Za 7 месяцев назад

    Thanks for the video !
    Isn't an opportunity to reduce cold start of nuxt too? The only disadvantage with nuxt vs only using vite is the cold start time.
    In nuxt it is significantly slower (hense the beautifully designed waiting loading screen in nuxt 3)
    In vite spa, there is this instant feeling of running dev command and opening the webapp.
    I understand that the nitro should be started in parallel to vite in nuxt, but compared to vite, the slowness is noticeable.
    I think the same Implementation could be utilized to achive better cold start performance.
    Need to dig deeper on the module, maybe another caching module could be created !
    Anyway, thanks for keeping the upload schedule consistent ❤

    • @TheAlexLichter
      @TheAlexLichter  7 месяцев назад +1

      Sadly not. The dev server can rarely benefit from a cache because a chance would invalidate most parts of it + vite is doing a great job here already.
      The server also needs the client first to ensure proper SSR, which is why it is sequential and not in parallel.
      But if you have ideas for specific improvements, please raise an issue in the repo!
      No problem at all 🙌🏻

    • @Saeid-Za
      @Saeid-Za 7 месяцев назад

      @@TheAlexLichter Thanks for responding!
      I wonder why cold start is slower compared to vite only setup.
      At least when we close our app and then start it again, we could leverage some sort of caching based on the reduced hash of our src directory, if it's not changed, we leverage the last .nuxt output from before.
      I'll try to implement a similar idea and introduce it as an issue.

    • @TheAlexLichter
      @TheAlexLichter  7 месяцев назад

      Ah, now I see. Might be interesting, even if it is just for a small part. The "problem" might be the virtual file system though.
      Nevertheless, yes, please raise an issue 👍🏻

  • @hieunguyen0801
    @hieunguyen0801 7 месяцев назад +2

    Can you make a video about authentication management in Nuxt 3?

    • @DavidDeSloovere
      @DavidDeSloovere 7 месяцев назад

      That would be a whole series 😊

    • @TheAlexLichter
      @TheAlexLichter  7 месяцев назад

      What type of authentication 👀

    • @hieunguyen0801
      @hieunguyen0801 7 месяцев назад

      @@TheAlexLichter Token-based Authentication (AT and RT)

  • @sonhongdo1033
    @sonhongdo1033 7 месяцев назад +1

    imagine rolldown + build cache in future

  • @TheFlyer1983
    @TheFlyer1983 7 месяцев назад

    I'm assuming this wouldn't be effective if you do your builds in GitHub Actions or Vercel/Netlify CI processes?

    • @TheAlexLichter
      @TheAlexLichter  7 месяцев назад +1

      It will be as it is cached in the node modules folder which should be cached by your CI 👀

  • @linpengteng
    @linpengteng 28 дней назад

    When the client code is modified, the server part also needs to be rebuilt?

  • @hegromar
    @hegromar 6 месяцев назад

    Does this module also have an impact on the speed of pnpm dev?

    • @TheAlexLichter
      @TheAlexLichter  6 месяцев назад

      Nope, caching the component in dev is a bit trickier.

  • @carminator12
    @carminator12 7 месяцев назад

    That's promising

    • @TheAlexLichter
      @TheAlexLichter  7 месяцев назад

      Right? You can already use it 👏🏻

  • @hyperprotagonist
    @hyperprotagonist 7 месяцев назад

    I wonder how well this will age given we’re exploring source code of an extremely experimental module 😣

    • @TheAlexLichter
      @TheAlexLichter  7 месяцев назад +1

      Might not be exactly the same in a few weeks/months/… but the idea will remain similar ☺️