Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 862 Bytes

README.md

File metadata and controls

37 lines (29 loc) · 862 Bytes

rollup-plugin-mdx

Import mdx/md markdown files into your app. Runs ("@babel/core").transformSync(code) on the output.

npm npm

Installation

npm install --save-dev rollup-plugin-mdx

Usage

// rollup.config.js
import mdx from 'rollup-plugin-mdx';

export default {
  input: 'src/index.js',
  output: [{
    file: 'dist/bundle.cjs.js',
    format: 'cjs'
  }],
  plugins: [
    mdx({
      // .md and .mdx files are parsed by default,
      include: 'node_modules/**',
      exclude: [ 'node_modules/foo/**', 'node_modules/bar/**' ],

      // ...mdxOptions
      babelOptions: {/* custom options */}
    })
  ]
};