Skip to content

Instantly share code, notes, and snippets.

@bshelling
Created January 22, 2020 15:38
Show Gist options
  • Save bshelling/b41b89ca8433e89da740c09811209ee7 to your computer and use it in GitHub Desktop.
Save bshelling/b41b89ca8433e89da740c09811209ee7 to your computer and use it in GitHub Desktop.
Markdown - Webpack configuration
const path = require('path');
const HtmlWebPlugin = require('html-webpack-plugin');
const marked = require('marked');
const renderer = new marked.Renderer();
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname,'dist')
},
module:{
rules:[{
test: /\.md$/,
use:[
{
loader: 'html-loader'
},
{
loader: 'markdown-loader',
options:{
pedantic: true,
renderer
}
}
]
}]
},
mode: 'development'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment