vue-router: Html remounts the whole page after hydration

Aperta
#8,815 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@pyyupsk ci sta già lavorando.

Dal 25/10/2026.

  • #8816 di @pyyupsk — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, typescript, vite
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
15.3k
Fork
1.9k
Merge medio
1g 5h
PR unite (30g)
46

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/router

Tutte le issue di TanStack/router

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.