@mapbox/jsxtreme-markdown-loader

3.1.0 • Public • Published

@mapbox/jsxtreme-markdown-loader

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

Runs files through the toComponentModule function of jsxtreme-markdown. Please read that documentation for more information.

For more information about jsxtreme-markdown features, read the README at the root of this monorepo.

Installation

npm install @mapbox/jsxtreme-markdown-loader

Usage

Follow the instructions for using Webpack loaders.

By default, the output of this loader is precompiled with Babel. You can bypass this step (and use your own compilation) by set the option precompile: false.

options

You can pass all of the options from toComponentModule.

Additional options for the loader:

getWrapper

Type: (resource: string) => string.

A function that receives the Webpack module's resource as an argument, and returns the path to a wrapper component. You can use this to automatically determine the wrapper component based on the Markdown file's path.

Package Sidebar

Install

npm i @mapbox/jsxtreme-markdown-loader

Weekly Downloads

59

Version

3.1.0

License

MIT

Unpacked Size

8.71 kB

Total Files

6

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user