0.2.0 • Published 7 years ago
@mapbox/md-react-transformer-loader v0.2.0
md-react-transformer-loader
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'sresource
as an argument, and returns the path to awrapper
component.
⚠️ The output of the default template includes JSX and ES2015 (class
), so you should chain this loader with the babel-loader
.