0.1.0 • Published 4 years ago

rollup-plugin-mdx v0.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

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 */}
    })
  ]
};