contentlayerdev / contentlayerdev/website
next.js build: building contentlayer prior to TSC or adding more clear docs
- 主要言語
- TypeScript
- スター
- 132
- フォーク
- 57
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
公式のGetting Startedサンプルとそのpackage.jsonのbuildスクリプトから始め、次に.contentlayerがない環境でCIの失敗を再現します。ドキュメントに記載されたbuildコマンドの前にContentlayerの実行が必要かどうかを確認します。サンプルが正常にビルドされ、ドキュメントに必要なコマンドまたは確認済みのサポート対象の動作が反映されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- next.js, typescript
- 領域
- build-system, documentation
- issue の種類
- ドキュメント
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100