contentlayerdev / contentlayerdev/website

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

Aperta
#105 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
132
Fork
57
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.