simple-md-loader
v1.0.1
Published
A simple webpack loader for converting Markdown text to HTML
Downloads
2
Readme
simple-md-loader
A simple webpack loader for converting Markdown text to HTML
Installation
npm install --save-dev simple-md-loader
Usage
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
mode: 'production',
entry: './src/js/index.js',
output:{
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.md$/,
use: [
{
loader: 'html-loader'
},
{
loader: 'simple-md-loader',
options: {
html: true,
linkify: true,
}
}
]
},
]
},
plugins: [
new HtmlWebpackPlugin({
filename: "index.html",
template: './src/views/index.html',
title: 'markdown-loader',
})
]
}