1.0.0 • Published 2 years ago

mingwiki-webpack-markdown-loader v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

webpack-markdown-loader

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

module.exports = {
	entry: {
		index: './src/index.js'
	},
	output: {
		path: path.resolve(__dirname, './dist')
	},
	resolveLoader: {
		modules: ['node_modules', './']
	},
	module: {
		rules: [
			{
				test: /\.md$/,
				use: [
					{
						loader: 'html-loader',
						options: {
							esModule: false,
						}
					},
					{
						loader: 'markdown-loader',
					}
				]
			}
		],
	},
	plugins: [
		new HtmlWebpackPlugin({
			title: 'test loader',
			template: './src/index.html',
			markdown: './src/article.md',
		}),
	]
}