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
Usage
var html = require("html!markdown!./README.md");
Recommended Configuration
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
}
};