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.
Installation
npm install markdown-loader
Changelog
Usage
Since marked's output is HTML, it's best served in conjunction with the html-loader.
Webpack 2+
{
module: {
rules: [{
test: /\.md$/,
use: [
{
loader: "html-loader"
},
{
loader: "markdown-loader",
options: {
/* your options here */
}
}
]
}]
}
}
Options
Pass your marked options as shown above.
In order to specify custom renderers, set the options.renderer
-option in your webpack config.
// webpack.config.js
const marked = require("marked");
const renderer = new marked.Renderer();
return {
module: {
rules: [{
test: /\.md$/,
use: [
{
loader: "html-loader"
},
{
loader: "markdown-loader",
options: {
pedantic: true,
renderer
}
}
]
}]
}
}
License
MIT (http://www.opensource.org/licenses/mit-license.php)