yarn add --dev parcel-plugin-markdown
import md from './Markdown.md';
document.body.innerHTML = md;
// If you want to pass options to marked
{
"name": "ABC",
"marked": {
"breaks": true
}
}
// you can also create a marked.config.js
// marked options is fully supported in marked.config.js
module.exports = {
highlight (code, lang) {
return `[${code}]`;
}
}