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

Vue 3.5 - Lazy Hydration does not work #425

Open
5 of 7 tasks
HummingMind opened this issue Nov 5, 2024 · 0 comments
Open
5 of 7 tasks

Vue 3.5 - Lazy Hydration does not work #425

HummingMind opened this issue Nov 5, 2024 · 0 comments

Comments

@HummingMind
Copy link
Contributor

HummingMind commented Nov 5, 2024

Describe the bug

Lazy Hydration, introduced in Vue 3.5, does not seem to work with vite-ssg.

index.vue

<script setup>
import { defineAsyncComponent, hydrateOnInteraction } from "vue";

const AsyncComp = defineAsyncComponent({
  loader: () => import("../components/Counter.vue"),
  hydrate: hydrateOnInteraction("wheel"),
});
</script>

<template>
  <AsyncComp />
</template>

Basically, the Counter should not work until it is hydrated by scrolling the mouse wheel. But it hydrates as soon as the async component is loaded.

Reproduction

The multiple-pages sample + code above

System Info

Node 22
vite-ssg 0.24.1

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant