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.
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?
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 ❤
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 🙌🏻
@@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.
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 👍🏻