0.2.0 • Published 7 years ago

@mapbox/md-react-transformer-loader v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

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.