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"]}
And installing the dependencies:
npm install --save-dev @babel/preset-env @babel/preset-react