🎉These docs are for v1 (currently in beta) — read the v0 docs →
MDX logoMDX v1.0.0-alpha.17
GitHub logo

Parcel

You’ll need to install the @mdx-js/parcel-plugin-mdx plugin to transpile MDX.

npm install --save-dev @mdx-js/parcel-plugin-mdx @mdx-js/react@next

Parcel will then automatically be able to handle MDX files.

Babel configuration

You will also need to configure babel to support the language features that MDX uses. One way you can achieve that is using the following .babelrc at your project root.

{
"presets": [
"@babel/env",
"@babel/react"
],
"plugins": [
"@babel/proposal-object-rest-spread"
]
}

And installing the dependencies:

npm install --save-dev @babel/preset-env @babel/preset-react @babel/plugin-proposal-object-rest-spread
Edit this page on GitHub
Next:
Getting Started