webpack loader that converts Markdown files into HTML using the marked library. v8.0.0 (Jan 2022) requires Node >=12.22.9 and webpack ^5.0.0. Released under semantic-release with monthly downloads ~1M. Typically used together with html-loader to handle the HTML output. Alternatives include markdown-to-html-loader or custom markdown handling, but this is a simple, focused loader that directly wraps marked.
npm install markdown-loaderVerified import paths — ran on the pinned version, not inferred.
Shows minimal webpack config to load .md files through markdown-loader and html-loader.
Ensure each rule's options are independent. Previously shared state may have caused unexpected behavior.
Upgrade to v8.0.0 or later if using Node >=12.22.9. For older Node, stay on v5.1.0.
Always use html-loader after markdown-loader in the loader chain.
Refer to marked documentation for valid options. Use a parse function in marked's options if advanced customization is needed.
For standalone markdown-to-HTML conversion, use marked directly instead.
Add a rule with test: /\.md$/ and use markdown-loader and html-loader.
npm install marked
Either use markdown-loader v7 or earlier for webpack 4, or upgrade to webpack 5.