razzle-plugin-mdx
v4.2.18
Published
Use mdx with Razzle
Readme
razzle-plugin-mdx
This package contains a plugin for using mdx with Razzle
Usage in Razzle Projects
npm i razzle-plugin-mdxor
yarn add razzle-plugin-mdxUsing the plugin with the default options
// razzle.config.js
module.exports = {
plugins: ['mdx'],
};Files with .md extension will be loaded as markdown and transpiled to html markup.
example:
import Document from './Document.md';
const Example = () => (<Document />);With custom options:
// razzle.config.js
const images = require('remark-images');
const emoji = require('remark-emoji');
module.exports = {
plugins: [
{
name: 'mdx',
options: {
remarkPlugins: [images, emoji],
},
},
],
};Options
Check all the options here: mdx-js options.
