mdx-bundler is a JavaScript/TypeScript library that compiles and bundles MDX (Markdown + JSX) content into a single evaluable JavaScript string. It uses esbuild for fast bundling and MDX v3 for compilation. The library allows users to provide MDX source code along with any dependency files (local, remote, or in-memory) and returns a bundled code string, parsed frontmatter, and errors. The bundled code can then be rendered in the browser using a client-side helper (`getMDXComponent`) that supports multiple JSX runtimes (React, Preact, Vue, Hono, etc.). It supports custom remark/rehype plugins, image bundling, global externals for dependency sharing, and flexible esbuild configuration. The architecture is centered around a single async function `bundleMDX` that orchestrates gray-matter parsing, esbuild with an in-memory file plugin, and MDX compilation. The client-side functions are minimal wrappers around `new Function` evaluation. The repository includes comprehensive tests for React, Preact, Vue, and Hono runtimes, and follows semantic release practices.