contentlayerdev / contentlayerdev/contentlayer

MDX and edge function size limit

オープン
#339 コメント 2 件 リアクション 5 件 担当者 0 名 GitHub で見る
meta: never-stale needs-research
主要言語
TypeScript
スター
3.5k
フォーク
192
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm using contentlayer with MDX for a blog and it is working pretty well, but recently i would like to use it in a vercel edge function as well. Edge functions have a bundle size limit of 1mb, which is achieved quite quickly with contentlayer and MDX. I've written about the problem and my workaround [here](https://sdorra.dev/posts/2022-11-24-contentlayer-mdx-edge). It would be nice if some better solution would be backed into contentlayer.

A few possible solutions come to my mind.

1. Split the body from the rest of the content and load it on demand with an async function on the entity
2. Option to create a separate collection of the entity without body
3. Hooks which makes it easy to write a separate collection without body on every change

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

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

評価

この issue はまだ評価されていません。

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

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