@@ -62,7 +62,7 @@ MDX is a language that’s compiled to JavaScript.
6262The easiest way to get started is to use an integration for your bundler if you
6363have one:
6464
65- * if you use ** esbuild** ,
65+ * if you use ** esbuild** (or Bun) ,
6666 install and configure [ ` @mdx-js/esbuild ` ] [ mdx-esbuild ]
6767* if you use ** Rollup** (or Vite),
6868 install and configure [ ` @mdx-js/rollup ` ] [ mdx-rollup ]
@@ -234,6 +234,10 @@ etc.) you use.
234234To use more modern JavaScript features than what your users support,
235235[ configure esbuild’s ` target ` ] [ esbuild-target ] .
236236
237+ See also [ ¶ Bun] [ javascript-engines-bun ] ,
238+ which you might be using,
239+ for more info.
240+
237241#### Rollup
238242
239243<details >
@@ -798,6 +802,26 @@ MDX files can be imported in Node by using
798802[ ` @mdx-js/node-loader ` ] [ mdx-node-loader ] .
799803See its readme on how to configure it.
800804
805+ #### Bun
806+
807+ MDX files can be imported in [ Bun] [ ] by using
808+ [ ` @mdx-js/esbuild ` ] [ mdx-esbuild ] .
809+
810+ <details >
811+ <summary >Expand example</summary >
812+
813+ ``` toml path="bunfig.toml"
814+ preload = [" ./bun-mdx.ts" ]
815+ ```
816+
817+ ``` js twoslash path="bun-mdx.ts"
818+ import {plugin } from ' bun'
819+ import mdx from ' @mdx-js/esbuild'
820+
821+ plugin (mdx ())
822+ ```
823+ </details >
824+
801825## Further reading
802826
803827* If you want to use MDX content in your project,
@@ -911,6 +935,10 @@ See its readme on how to configure it.
911935
912936[ build-system-vite ] : #vite
913937
938+ [ bun ] : https://bun.sh
939+
940+ [ javascript-engines-bun ] : #bun
941+
914942[ bundler-esbuild ] : #esbuild
915943
916944[ bundler-rollup ] : #rollup
0 commit comments