@mapbox/md-react-transformer-loaderdeprecated

Webpack loader to transform Markdown with interpolated JS and JSX into React components

Usage no npm install needed!

<script type="module">
  import mapboxMdReactTransformerLoader from 'https://cdn.skypack.dev/@mapbox/md-react-transformer-loader';
</script>

README

md-react-transformer-loader

Build Status

Webpack loader to transform Markdown with interpolated JS and JSX into React components.

Runs files through the mdToComponentModule function of md-react-transformer.

You can pass all of the options from mdToComponentModule (e.g. a custom template).

Additional options for the loader:

  • getWrapper ?Function - A function that receives the module's resource as an argument, and returns the path to a wrapper component.

⚠️ The output of the default template includes JSX and ES2015 (class), so you should chain this loader with the babel-loader.