1.0.1 • Published 4 years ago

webpack-markdown-loader v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

Markdown Loader

A markdown loader for webpack using markdown-it.

Installation

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

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: 'webpack-markdown-loader',
					options: {
						html: true
					}
				}],
			}
		]
	},

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