1.0.2 • Published 3 years ago

markdown-loader-webpack v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Markdown Loader

It's a markdown loader for webpack using markdown-it

Installation

npm install --save-dev markdown-loader-webpack

Usage

const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = {
	entry: {
		index: './src/js/index.js'
	},
	module: {
		rules: [
			{
				test: /\.md$/,
				use: [
				{
					loader: 'html-loader'
				},
				{
					loader: 'markdown-loader-webpack',
					options: {
                        html: true
                    }
				}],
			},
		]
	},

	plugins: [
		new HtmlWebpackPlugin({
			filename: 'index.html',
			template: 'src/views/index.html',
			title: 'example'
		}),
	]
}