Created
January 22, 2020 15:38
-
-
Save bshelling/b41b89ca8433e89da740c09811209ee7 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