MarkdownPlugin

Description

Markdown Plugin generates HTML from Markdown files.

Usage

const {MarkdownPlugin} = require("fuse-box");
plugins: [
  MarkdownPlugin({
    useDefault: false,
    /* marked options */
  }),
]

It depends on marked library, so it must be installed first :

yarn add marked --dev
npm install marked --save-dev

Toggle useDefault to make Markdown files export strings as default property. For example with useDefault: true you will be able to import Markdown files like so:

import tpl from "~/views/file.md"

With useDefault: true, is as if the html file contains this:

export default `
  <!DOCTYPE html>
  <title>eh</title>
`

For other options, see https://github.com/chjj/marked.