Replies: 1 comment
-
PR #2221 is probably related, but I don't think, that all the components will be loaded on initial page load with only this... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I notice that in one of my page using Nuxt Content, the components used in the Markdown renderer are only lazy loaded when they are needed. For example in the following page, I hide certain elements and only show them, using
<ContentRenderer :value="slide" />
when I click some buttons (*). As you see, the components are only loaded when they are needed.Screen recording
Screen.Recording.2023-07-17.at.2.46.08.PM.mov
(
CustomComponent
is a component I defined incomponents/content
)Normally this is a very good feature, but for this one time I would like to load all Nuxt Content components on page load – I would like to sacrifice initial page load so that components are available instantly when I need them. How can I do that?
I'm actually not even sure if this is related to Nuxt Content, as I'm quite new to Nuxt. If you need more info do let me know – I can't provide a minimal reproduction repository at the moment but will try to if it is necessary.
(*) The showing/hiding mechanism is like this
I did not explicitly opt into any lazy loading; and the way I see it, although the component is hidden in the tree, I still run
ContentRenderer
for the entire content of the page (not just the visible part), so I would like the required components to be loaded on page load as well.Beta Was this translation helpful? Give feedback.
All reactions