Attaching references after the build

オープン
#420 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
typescript
領域
data

調査の方向性

ファイル、テスト、エントリポイントは指定されていません。まず、ビルド完了処理と参照処理のパスを見つけ、既存の transformer の動作を、要求されているビルド後のフィールドキャッシュおよび Tag[] のハイドレーションと比較してください。カスタム transformer なしで両方の機能が連携して動作し、tags と posts の例に対するカバレッジがあれば完了です。

索引モデルが issue の本文から書いたものです。

説明

meta: never-stale needs-research topic: schema

The simple version of this is that I have two document types and I want to cache some static field on a document after the build has completed.

For example, let's say I have tags and posts, and I want a tag object to have a postCount attribute that caches the number of posts to which the tag was applied.


The more complex example is to be able to "hydrate" references without needing to write my own transformer function.

In the example above, posts would have a tags field reference. But I'd love if what were returned was of type Tag[] rather than string[].


Having both together would be ideal.

主要言語
TypeScript
スター
3.5k
フォーク
192
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

contentlayerdev/contentlayer のほかの issue

contentlayerdev/contentlayer の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。