Fix mermaid import (it uses ESModule now) (#18382)

This commit is contained in:
wxiaoguang 2022-01-24 21:40:51 +08:00 committed by GitHub
parent 21838225ab
commit f7f4129f52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ function displayError(el, err) {
export async function renderMermaid(els) { export async function renderMermaid(els) {
if (!els || !els.length) return; if (!els || !els.length) return;
const mermaid = await import(/* webpackChunkName: "mermaid" */'mermaid'); const {default: mermaid} = await import(/* webpackChunkName: "mermaid" */'mermaid');
mermaid.initialize({ mermaid.initialize({
mermaid: { mermaid: {