Closed DEADSEC-SECURITY closed 3 years ago
Can't reproduce.
@maoberlehner here is repo with nuxt https://github.com/gibkigonzo/vue-lazy-hydration-85
I used same setup in vue-storefront (also uses vue-server-renderer) and there it works when using function wrappers (for example hydrateWhenVisible
), but doesn't work with LazyHydrate
You can check in Network tab that logo
script is loaded even if it's not hydrated yet
It might be because of Vue / Nuxt are trying to preload the component: https://ssr.vuejs.org/api/#shouldpreload https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-render#resourcehints https://cli.vuejs.org/guide/html-and-static-assets.html#preload
Perhaps related to https://github.com/vuejs/vue/issues/9847 ?
So I'm trying to use this library but I don't seem to be able to make it work. I followed the docs but it loads the component like without the plugin.
MY CODE:
I have more code but it's +1.5K lines so ill just leave this simplified version.
I tried when visible and on idle but all of them load normally without any lazy loading from the plugin.