timlrx / contentlayer2

Contentlayer turns your content into data - making it super easy to import MD(X) and CMS content in your app
https://contentlayer.dev
MIT License
153 stars 11 forks source link

Ensure maximum compatibility with mdx-bundler #19

Closed eps1lon closed 3 months ago

eps1lon commented 3 months ago

mdx-bundler doesn't document usage without its client entrypoint. This replaces the custom implementation of getMDXComponent with the one exported by mdx-bundler/client. Otherwise changes such as https://github.com/kentcdodds/mdx-bundler/pull/229 would break next-contentlayer.

We're using this patch at Vercel in nextjs.org already.

eps1lon commented 3 months ago

How reliable are these Windows runs? Can't see any change that would only break on Windows but pass on Linux and macOS.

timlrx commented 3 months ago

How reliable are these Windows runs? Can't see any change that would only break on Windows but pass on Linux and macOS.

It's an existing issue with Contentlayer and unrelated to this PR. The fix looks good to me, thanks!