Closed weotch closed 5 years ago
At least in 0.4.1, even if load=true
, the asset isn't rendered in the markup during SSR. The problem use case is when the marquee uses vue visual but there are a bunch of WYSWIYG rendered non-vue-visual assets in the page, the marquee assets load after since they are initialized after the simply embdeded HTML ones. Also, this would be better for SEO.
Actually, the correct way to do this is to clear the transitions for the asset you want to load immediately ... then it will be rendered immediately. So like:
vue-visual(
:poster='$contentful.img(page.image, 274, 82)'
:image='$contentful.img(page.image, 2740, 820)'
:load-poster='true'
transition-poster='')
Then the poster will be rendered in the original markup ... however, I'm thinking of handling a different way for this use case, using <link rel="preload">
with the marquee images I want to request before the WYSIWYG body ones.
Yeah, the link preload approach worked for me
Currently, when vue-visual gets SSRed via Nuxt, there is no asset rendered. It would be nice if the rendering of the initial asset during SSG didn't depend in Nuxt hydrating the JS. This would also make it work better with
lazy-hyrdate
.