Package detail

markdown-loader

peerigon383.9kMIT8.0.0

markdown-loader for webpack

webpack, plugin, markdown, html

readme

markdown-loader

markdown-loader for webpack using marked.

Version on NPM Semantically released Monthly downloads on NPM
License

Installation

npm install markdown-loader

Minimal requirements:

  • Node >=12.22.9
  • webpack >=5.0.0

Usage

Since marked's output is HTML, it's best served in conjunction with the html-loader.

// webpack.config.js
export default {
  module: {
    rules: [
      {
        test: /\.md$/,
        use: [
          {
            loader: "html-loader",
          },
          {
            loader: "markdown-loader",
            options: {
              // Pass options to marked
              // See https://marked.js.org/using_advanced#options
            },
          },
        ],
      },
    ],
  },
};

License

MIT (http://www.opensource.org/licenses/mit-license.php)

Sponsors

changelog

8.0.0 (2022-01-27)

  • Introduce semantic-release (65e2368)

BREAKING CHANGES

  • Every call to marked is isolated now. This makes sure that options from the first call won't influence options from the second call. If you've configured the markdown-loader with two different options, you might observe different behavior now. We also removed Node v8 and Node v10 support and support for older webpack versions. Webpack 5 is required now.

Changelog

7.0.0

  • Breaking: Update marked@4.0.12 to fix security issues (#82)

6.0.0

  • Remove Node v6 support

5.2.0

  • Update dependencies
  • Note: This version is deprecated since it already removed official Node v6 support which should have been published as breaking change

5.1.0

  • Update dependencies

5.0.0

  • Update dependencies
    • Breaking marked@0.6.0 @tmorehouse Changelog
  • switch to snapshot tests @meaku
  • reduce shipped files via npm @styfle
  • fix URL to marked repo @styfle

4.0.0

  • Update dependencies
    • Breaking marked@0.5.0 @robcresswell Changelog

3.0.0

  • Update dependencies
    • Breaking marked@4.0.0 (@hpohlmeyer) Changelog
    • use webpack 4.x for tests
    • update example to use npm version of markdown-loader

2.0.2

  • Update dependencies
    • marked@0.3.9 (@xuopled)

2.0.1

  • Update dependencies
    • loader-utils@1.1.0 (@kommander)

2.0.0

  • Breaking: Drop Node.js 0.12 support
  • Breaking: Drop support for custom config key (webpack 1)
  • Update documentation for webpack 2
  • Add tests
  • Update dependencies
    • marked@0.3.6