Created
January 22, 2020 15:38
-
-
Save bshelling/bde4d0f4a3b55f1b2e4cccad21322d68 to your computer and use it in GitHub Desktop.
Markdown - Webpack configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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