1.0.0 • Published 4 years ago

webpack-md-loader v1.0.0

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

webpack-md-loader

A webpack-md-loader for webpack using markdown-it.

Installation

npm install --save-dev webpack-md-loader

Usage

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


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