Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including snowpack-plugin-mdx with all npm packages installed. Try it out:

require("@mdx-js/mdx/package.json"); // @mdx-js/mdx is a peer dependency. require("snowpack/package.json"); // snowpack is a peer dependency. var snowpackPluginMdx = require("snowpack-plugin-mdx")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

snowpack-plugin-mdx v0.3.1

Use the MDX compiler to build `.mdx` and `.md` files in Snowpack


Use the MDX compiler to build .mdx and .md files in Snowpack
npm i -D snowpack-plugin-mdx @mdx-js/mdx @mdx-js/react

Types Code coverage Build status NPM Version MIT License

Quick start

// snowpack.config.json
  "plugins": [["snowpack-plugin-mdx", { /* see "Plugin Options" below */ }]]

Plugin Options

interface SnowpackPluginMdxOptions {
   * Includes only the  specified paths
  include?: string[]
   * Excludes the specified paths
  exclude?: string[]
   * These options are passed directly to babel.transformAsync()
  babelOptions?: TransformOptions
   * These options are passed directly to the MDX compiler
  mdxOptions?: Record<string, any>
   * Override the default renderer
   * @default ```js
   *   import React from 'react'
   *   import { mdx } from '@mdx-js/react'
   * ```
  renderer?: string



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free