Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

start-plugin-core: sitemap lastmod and pages.json lastBuilt are stamped with the build's wall clock (no SOURCE_DATE_EPOCH support)

Abierto Apto para principiantes
#8,512 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
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
84/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
build-system

Línea de trabajo

Comienza en src/build-sitemap.ts y sigue los dos lugares donde se escribe new Date() en sitemap.xml y pages.json. Ejecuta el reproductor mínimo de build con SOURCE_DATE_EPOCH establecido y verifica después que las compilaciones repetidas produzcan sitemap.xml y pages.json idénticos byte a byte, mientras que las compilaciones sin la variable conserven el comportamiento actual.

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

Descripción

Which project does this relate to?

Start

Describe the bug

@tanstack/start-plugin-core's sitemap builder (src/build-sitemap.ts) writes new Date() into two places on every build:

  • <lastmod> of every sitemap entry whose route declares no sitemap.lastmod — which is every page discovered by crawlLinks, since crawled pages have no per-page config to set one on;
  • lastBuilt in pages.json.

So building the same sources twice on different days yields different output. That breaks any deploy pipeline that hashes the client dist to decide whether prod is current (ours: a Bazel build whose dist hash is compared against the last deploy; a lint-tool dependency bump re-ran the vite action and every page's lastmod moved to that day, reporting the site as changed when nothing user-visible had). It also makes the sitemap's lastmod meaningless to crawlers: Google documents that it uses lastmod only when it is "consistently and verifiably accurate", and a build date tells them every page changed on every rebuild.

There is no configuration escape hatch: the top-level sitemap options are enabled, host, outputPath only, and the default cannot be reached for crawled pages.

The reproducible-builds convention for exactly this is the SOURCE_DATE_EPOCH environment variable (https://reproducible-builds.org/specs/source-date-epoch/), which build tools consult in place of "now" for embedded timestamps. The plugin does not read it.

Complete minimal reproducer

Any Start app with prerendering, link crawling and sitemap.host set (the SEO guide's example config):

pnpm build && cp dist/client/sitemap.xml /tmp/a.xml
# next day, or with a faked clock:
faketime '+1d' pnpm build && cp dist/client/sitemap.xml /tmp/b.xml
diff /tmp/a.xml /tmp/b.xml   # every <lastmod> differs; sources unchanged

Expected: with SOURCE_DATE_EPOCH=1700000000 exported, both builds produce byte-identical sitemap.xml and pages.json. Without it, current behavior is fine to keep.

PR to follow.

Lenguaje dominante
TypeScript
Estrellas
15.1k
Forks
1.9k
Merge medio
2 d 1 h
PR fusionados (30 d)
134

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 TanStack/router

Todos los issues de TanStack/router

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.