Parse MDX syntax to JSX, and compile JSX (via API endpoint!)
Getting Started
Usage
Built With
Contributing
The MDJSX API is single endpoint that allows users to transpile MDX to JSX, as well as compile JSX with Bublé.
The MDJSX API supports passing additional options to the MDX parser or Bublé.
This can be done by providing a query.options object with the following shape:
type TranspileCompileOptions = {
buble?: TransformOptions
mdx?: mdx.Options
}// Default options used in MDJSX REST API
const options: TranspileCompileOptions = {
buble: { objectAssign: 'Object.assign' },
mdx: { skipExport: true }
}Type definitions can be found here.
Transpile MDX to JSX, and compile JSX.
If an error is thrown, it will have the following shape:
{
"name": "GeneralError",
"message": "",
"code": 500,
"className": "general-error",
"data": {
"body": "",
"query": {
"compile": true,
"options": {}
}
},
"errors": {}
}- @flex-development/mdjsx - MDJSX core library
- Vercel - Hosting platform for serverless functions

