Executable Code
mdxe
Execute MDX documents in any JavaScript runtime
mdxe
Execute MDX documents as live, interactive applications across any JavaScript runtime.
What is mdxe?
mdxe is the execution layer for MDX documents. It compiles and runs MDX content in:
- Node.js - Server-side execution
- Edge - Cloudflare Workers, Vercel Edge
- Browser - Client-side rendering
- Terminals - CLI applications with Ink
Features
- Universal Execution - Run MDX anywhere JavaScript runs
- Isolated Contexts - Secure sandboxed execution
- Hot Reloading - Development with instant feedback
- Component Injection - Custom component libraries
- Streaming - Progressive rendering support
Runtime Adapters
| Package | Runtime | Description |
|---|---|---|
| @mdxe/workers | Cloudflare | Edge worker execution (local dev via Miniflare) |
| @mdxe/hono | Hono | Lightweight web framework |
| @mdxe/ink | Terminal | CLI applications |
Supporting Packages
| Package | Purpose |
|---|---|
| @mdxe/isolate | Sandboxed execution |
| @mdxe/vitest | Testing utilities |
| @mdxui/fumadocs | Documentation sites |
Installation
Or install runtime-specific packages:
Quick Example
Architecture
Next Steps
- Getting Started - Set up your first mdxe project
- Workers Runtime - Cloudflare Workers and local Miniflare execution