contentlayerdev / contentlayerdev/website

next.js build: building contentlayer prior to TSC or adding more clear docs

Abierto
#105 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
132
Forks
57
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When following the official Getting Started example for Next.js, the app fails to build on CI or any environemnt where `.contentlayer` doesn't exist already.

This appears to be because TSC runs _prior_ to contentlayer, which errors out.

I'm not sure if this can be changed at all (to run a Next plugin prior to the TSC step). That would seem like the ideal solution, but otherwise, would be great to update the documentation & examples to modify the build step

```json
"scripts": {
"build": "contentlayer && next build"
}
```

I'm happy to make a PR to help out, just wanted to check if this is indeed an issue that others experience or if I'm really missing something basic

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza con el ejemplo oficial de Getting Started y su script de build de package.json, y luego reproduce el fallo de CI en un entorno sin .contentlayer. Comprueba si el comando de build documentado necesita ejecutar primero Contentlayer; el trabajo estará terminado cuando el ejemplo se compile correctamente y la documentación refleje el comando necesario o el comportamiento compatible confirmado.

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

Evaluación

Stack tecnológico
next.js, typescript
Área
build-system, documentation
Tipo de issue
Documentación
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.