1.0.1 • Published 8 months ago

simple-md-loader v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

simple-md-loader

A simple webpack loader for converting Markdown text to HTML

Installation

npm install --save-dev simple-md-loader

Usage

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

module.exports = {
  mode: 'production',
  entry: './src/js/index.js',
  output:{
    path: path.resolve(__dirname, 'dist')
  },

  module: {
    rules: [
      {
        test: /\.md$/,
        use: [
          {
            loader: 'html-loader'
          },
          {
            loader: 'simple-md-loader',
            options: {
              html: true,
              linkify: true,
            }
          }
        ]
      },
    ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      filename: "index.html",
      template: './src/views/index.html',
      title: 'markdown-loader',
    })
  ]
}
1.0.1

8 months ago

1.0.0

8 months ago