vue-router: Html remounts the whole page after hydration

Đang mở
#8,815 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@pyyupsk đang làm issue này rồi.

Từ ngày 25/10/2026.

  • #8816 của @pyyupsk — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, typescript, vite
Lĩnh vực
frontend

Hướng nghiên cứu

The bug lies in the Html component of @tanstack/vue-start, which renders a Fragment instead of the hydrated Body vnode. Use the reproducer repo to observe the double mount, and inspect the component's hydration logic. An open PR #8816 already addresses this, so coordinate there. Done when the page stays mounted and only head teleport is added.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Which project does this relate to?

Start

Describe the bug

After hydration, Html renders Fragment([body, teleport]) in place of the Body vnode that it hydrated. The root vnode type changes, so Vue unmounts the hydrated page and mounts it again. Every component on the page mounts twice, and CSS animations start again.

Complete minimal reproducer

https://github.com/pyyupsk/vue-start-html-remount

Steps to Reproduce the Bug
  1. Run npm install && npm run dev in the reproducer.
  2. Open http://localhost:3000 with the browser console open.
  3. Home mounted logs twice, and the heading animation plays twice. npm run build && npm run preview does the same.
Expected behavior

The hydrated page stays mounted. Only the head teleport is added.

Screenshots or Videos

No response

Platform
  • Router / Start Version: @tanstack/vue-router 1.170.42, @tanstack/vue-start 1.169.4
  • OS: Windows (dev server in WSL2)
  • Browser: Helium (Chromium 156.0.8078.47)
  • Browser Version: 0.20.1.1
  • Bundler: vite
  • Bundler Version: 8.3.5
Additional context

Possibly related to #6764. I used AI help to find the cause.

Ngôn ngữ chính
TypeScript
Star
15.3k
Fork
1.9k
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
46

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/router

Tất cả issue của TanStack/router

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.