Skip to content
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

<ClientOnly> with <template #fallback> always results in hydration error in RC10 #14896

Closed
TheDutchCoder opened this issue Sep 14, 2022 · 1 comment · Fixed by nuxt/framework#7527 or nuxt/framework#7659

Comments

@TheDutchCoder
Copy link
Contributor

Environment


  • Operating System: Darwin
  • Node Version: v16.15.1
  • Nuxt Version: 3.0.0-rc.10
  • Nitro Version: 0.5.3
  • Package Manager: npm@8.12.1
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-kmye2r?file=components%2FTestThing.vue,components%2FTestThing2.vue,app.vue

Describe the bug

When using a ClientOnly component with a fallback templates, as described in the docs, you will always get hydration errors.

Additional context

No response

Logs

No response

@danielroe
Copy link
Member

For now, you can workaround by setting:

export default defineNuxtConfig({
  experimental: {
    treeshakeClientOnly: false
  }
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment