JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 65372
  • Score
    100M100P100Q178854F
  • License MIT

markdown-loader for webpack

Package Exports

  • markdown-loader

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (markdown-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

markdown-loader

markdown-loader for webpack using marked.

Setup

npm status

dependencies devDependency Status

Usage

var html = require("html!markdown!./README.md");

Since marked's output is HTML, it's best served in conjunction with the html-loader.

{
    module: {
        loaders: {
            { test: /\.md$/, loader: "html!markdown" },
        ]
    }
}

Options

marked-options are passed via query params:

{
    module: {
        loaders: {
            { test: /\.md$/, loader: "html!markdown?gfm=false" },
        ]
    }
}

Custom renderer

In order to specify custom renderers, simply set the markdownLoader.renderer-option on your webpack options. You can also change the options' key with a query parameter: "markdown?config=markdownLoaderCustomConfig".

// webpack.config.js

var marked = require("marked");
var renderer = new marked.Renderer();

module.exports = {
    ...
    markdownLoader: {
        renderer: renderer
    }
};

License

MIT (http://www.opensource.org/licenses/mit-license.php)