1.0.0 • Published 4 years ago

doc-md-loader v1.0.0

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

Markdown loader

A Markdown Document loader for webpack using markdown-it.

Installation

npm install --save-dev doc-md-loader

Usage

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

module.exports = {
    entry: {
        index: './src/js/index.js'
    },
    plugins: [
        new HtmlWebpackPlugin({
            title: 'markdown-it',
            template: './src/views/index.html'
        })
    ],
    module: {
        rules: [
            {
                test: /\.md$/,
                use: [{
                        loader: 'html-loader'
                    },
                    {
                        loader: 'markdown-loader',
                        options: {
                            html: true
                        }
                    }
                ]

            }
        ]
    }
};