-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hydration error with scoped slots #164
Comments
I have the same issue, and for resolved I import manually the components inside slot. But it's better if I don't have to do this. With the previous version it's work perfectly |
@joffreyBerrier For now you should be able to use this as a workaround: components: {
loader: true
} (Note: not recommended nor guaranteed to always work.) A linked issue: nuxt/nuxt#8879 |
The issue is that we components v2, we use async imports in dev mode without loader. This causes nuxt/nuxt#6844 and vuejs/vue#10391. So there is not much do do in nuxt side other than explicitly importing components or force enabling |
Enabling the loader does not help - it does not fix the reproduction sandbox either 😢 Edit: the sandbox needed a restart - thanks @danielroe |
@schneefux It fixes the reproduction sandbox for me 🙂 |
Waiting for upstream: vuejs/vue#11963 |
But @pi0 however on version 2.14.12 of nuxt which uses nuxt/components V1 it works fine, why it doesn't work anymore I don't understand. So the solution is to import each component in a slot like old way ? |
@joffreyBerrier This is because with v2, during development instead of using loader to import components, we use global async components. This significantly improves development build but also revealed this bug in vue. In the meantime, you can enable loader in development (#164 (comment)) to use v1 behavior. |
I thought that the auto import was "just an automatic import of components" in the components folder but it's more complicated thank's :) So you advise me to import the components that are in slots like the old way and that's it ? |
For now yes or use |
@pi0 Upstream was merged btw |
I'm having the same issue, even with |
Hi all,
There are some issues rendering slotted components and using this module with components auto discovery enabled.
Original issue
I think an example will illustrate the problem better:
Having a simple slotted component:
Let's call it Card.vue
Having a simple component let's call it Text.vue
Now using these components together throws a hydration error:
The really weird part is that using the same markup just once doesn't throw an error.
No error
Original issue
Sandbox to reproduce
Sandbox to prove it's working with simple vue-cli and vue-server-render application
Sandbox to prove it's working in Nuxt without component auto discovery
Related issues
Thanks a lot in advance everyone,
I am trying to dig dipper into this and help as much as I can so let me know if I can provide anything more to help you out.
The text was updated successfully, but these errors were encountered: