contentlayerdev / contentlayerdev/website
next.js build: building contentlayer prior to TSC or adding more clear docs
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 132
- 派生
- 56
- 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
"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
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从官方 Getting Started 示例及其 package.json 构建脚本开始,然后在没有 .contentlayer 的环境中重现 CI 失败。检查文档中的构建命令是否需要先运行 Contentlayer;当示例成功构建,并且文档反映所需命令或已确认的受支持行为时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- next.js, typescript
- 领域
- build-system, documentation
- Issue 类型
- 文档
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100