esbuild-plugin-markdown
v0.0.3
Published
Import markdown files with esbuild
Downloads
576
Readme
esbuild-plugin-markdown
Import markdown files with esbuild
, using marked.
Install
yarn add -D esbuild-plugin-markdown
or
npm i -D esbuild-plugin-markdown
Usage
Add it to your esbuild plugins list:
const esbuild = require("esbuild");
const { markdownPlugin } = require("esbuild-plugin-markdown");
esbuild.build({
...
plugins: [
markdownPlugin()
]
...
});
import markdownFile from "../assets/example.md";
// markdownFile: {
// html: parsed markdown (with "marked")
// raw: raw markdown file
// filename: imported file's absolute path
// }
Options
You can add your own custom configuration of options to esbuild-plugin-markdown
:
markdownPlugin({
// options
});
markedOptions
Custom marked options.