SSR manifest: `vite build --app --watch` embeds the previous round's client index.html

Abierto
#705 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
46/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, rust

Línea de trabajo

Read the watch-mode build flow around buildStart, generateBundle, transform, and renderChunk, then trace how the server environment reads the client index.html. Reproduce with vite build --app --watch and inspect the SSR output across consecutive rounds. Done means each round embeds the matching client page and a client-only change also updates the server output.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Follow-up to #696 (fixed in #697 for normal builds). Found while reviewing #697.

In vite build --app --watch the server environment reads the client index.html in its own buildStart. The client of the same round only writes the new page later, in generateBundle. So every round embeds the page from the round before:

round 1   embeds /src/main.ts (source page)   disk: index-CDAm_wYV.js
round 2   embeds index-CDAm_wYV.js            disk: index-DK41E1g1.js
round 3   embeds index-DK41E1g1.js            disk: index-CheYs2QK.js
→ the SSR page loads a script that is 404 and never hydrates

#697 prints a warning each round, so this is not silent, but the output is still wrong. In watch mode the two environments run at the same time, so listing client first doesn't help.

Possible fix: each client round resolves a promise in its generateBundle. The server embeds a placeholder at transform time and fills it in renderChunk / generateBundle after awaiting that promise. A client-only change also needs to rebuild (or patch) the server output.

Lenguaje dominante
Rust
Estrellas
245
Forks
26
Merge medio
1 d 23 min
PR fusionados (30 d)
83

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de voidzero-dev/oxc-angular-compiler

Todos los issues de voidzero-dev/oxc-angular-compiler

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.