Keep zod out of the startup path to shrink the main bundle
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 32/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript, vite
- Área
- frontend, performance, testing
Línea de trabajo
Start with apps/web/vite.config.ts and packages/engine/src/load.ts, then read apps/web/src/services/packs.ts and the referenced ADRs and SECURITY.md. Measure the current chunks and compare the listed options; record the chosen approach and main chunk budget in the issue. Done means CI enforces the budget, an invalid stored pack is rejected before engine execution, and throttled mobile startup time is measured before and after.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
At the v0.1 pull request the main chunk is about 85 KB gzip (270 KB raw). It includes zod, pulled in by loadPack, which validates every pack (built-in, stored, imported) before use. The Create screen (54 KB gzip) and the YAML compiler (32 KB gzip) are already separate chunks. Start-up time on low-end phones matters (ADR 0009), and validation at the boundary must stay (SECURITY.md).
Options
- A. A small hand-written validator for the canonical compiled form (
.lexpack.jsonhas one shape), used byloadPack; zod stays for YAML compile and import. Drift risk: test it against the zod schema with shared valid and invalid fixtures. - B. Lazy-load the zod chunk: the library shows catalog metadata, and full validation runs when a game starts.
- C. Trust built-in packs by a content hash recorded at build time (they pass
lexvm checkin CI); validate stored and imported packs with zod, lazily. - D. A smaller schema library. This is a new dependency and changes ADR 0004.
Scope
Measure the chunks, choose an option (an ADR if D), agree a size budget for the main chunk in this issue, and enforce it in CI.
Acceptance criteria
- The chosen option and the budget are recorded in this issue (ADR if D).
- The main chunk is within the budget; CI fails when it is exceeded.
- Every pack is still validated before the engine runs it (test with a crafted invalid
.lexpack.jsonin storage). - Start-up time on a throttled mobile profile is measured before and after.
References
- apps/web/vite.config.ts
- packages/engine/src/load.ts
- apps/web/src/services/packs.ts
- docs/adr/0004-yaml-source-json-runtime-zod-schema.md
- docs/adr/0009-vanilla-typescript-ui.md
- SECURITY.md (Controls)
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 28 min
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nullthrone/lexvm
-
area: web good first issue priority: low type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
nullthrone/lexvm#49 ·
-
area: infra good first issue priority: low type: chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
nullthrone/lexvm#41 ·
-
area: engine good first issue priority: low type: feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
nullthrone/lexvm#27 ·
-
area: web priority: low type: research
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
nullthrone/lexvm#63 ·
-
area: infra area: web priority: medium type: chore
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
nullthrone/lexvm#62 ·
Todos los issues de nullthrone/lexvm
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
area:plugins area:security area:skills bug has repro
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
anthropics/claude-code#105911 ·
Los mantenedores suelen responder en 1 día
-
[ko] Translate /team into KoreanAbiertodocumentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
dev-five-git/devup-ui#879 ·
Los mantenedores suelen responder en 11 días
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Fission-AI/OpenSpec#2165 ·
Los mantenedores suelen responder en 1 día
-
🐞 bug 🧐 unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Tencent/tdesign-vue-next#7032 · 1 comentario ·
Los mantenedores suelen responder en 1 día