Fix for Unexpected "<" when using mdx-bundler

Published: Sat Jun 26 2021

I had an issue with getting mdx-bundler to render custom react components. The page with the component would choke with the following error: error: Unexpected "<".

Turns out that esbuild, which is used by mdx-bundler under the hood expects component files to have an '.jsx' extension. That fixes it.

I deciced to switch to next-mdx-remote since I ran into other issues as well and spent enough time trying to fix them.