question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace `mdx-bundler` with `@mdx-js/esbuild`

See original GitHub issue

Seems like MDX v2 is just around the corner so we should investigate upgrading to it soon.

We should also verify whether mdx-bundler is still needed with MDX v2.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
marcofranssencommented, Mar 11, 2022

Note: Practically speaking Contentlayer users should already be using MDX v2 today.

What do you mean by this Note? How can/should we practically use MDX v2?

1reaction
schicklingcommented, Feb 9, 2022

Update: I’ve started investigating replacing mdx-bundler with @mdx-js/esbuild however this doesn’t seem to be entirely trivial given esbuild.build() expects a “physical” file path instead of an input string (which is what the current Contentlayer implementation is structured around). This is something mdx-bundler is providing out of the box which is why I’ll stick to mdx-bundler for the time being (until this becomes easier to do - or there’s another reason to do so).

Once https://github.com/kentcdodds/mdx-bundler/pull/152 I’ll update the mdx-bundler dependency.

Note: Practically speaking Contentlayer users should already be using MDX v2 today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remix + mdx-bundler, getting error ERROR: [plugin: @mdx-js ...
ERROR: [plugin: @mdx-js/esbuild] TypeError: this.replace is not a function ... I'm using mdx-bundler with React 18 on Remix and not having any issues....
Read more >
mdx-js/esbuild
Create an esbuild plugin to compile MDX to JS. esbuild takes care of turning modern JavaScript features into syntax that works wherever you...
Read more >
swapping rollup and mdx-js for esbuild and xdm - YouTube
Join discord to participate: https://kentcdodds.com/discord.
Read more >
Kent C. Dodds on Twitter: "mdx-bundler release 9.0.0 comes ...
9.0.0 (2022-04-01) Features replace xdm with MDX v2 (#152) (8a4e6a6) BREAKING CHANGES We now use @mdx-js/esbuild instead of xdm and xdmOptions has been...
Read more >
How to use Mdx-bundler with your Next.js Blog - Peter Lunch
This is a guide to get mdx-bundler working with a Nextjs blog. It also shows you how to use ... npm install --save...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found