/mdx-with-playgrounds

Webpack utils for parsing mdx with live playgrounds

Primary LanguageJavaScript

Webpack utils for parsing mdx with live playgrounds

To use with webpack 5, use this loader:

const mdxWithPlaygroundsLoaders = require('mdx-with-playgrounds')();

const webpackConfig = {
  // ...
  module: {
    rules: [
      {
        test: /\.mdx?$/,
        use: [
          // your project babel loader
          babelLoader,
          ...mdxWithPlaygroundsLoaders
        ]
      }
    ]
  }
};

Module API

const mdxWithPlaygroundsLoaders = require('mdx-with-playgrounds')({
  remarkPlugins: [],
  rehypePlugins: []
});

For more information, see MDX docs