-
How do I register additional icon sets with Mermaid? I tried to put the code snippets from the Mermaid documentation into I also had add this
|
Beta Was this translation helpful? Give feedback.
Answered by
jgosmann
Nov 11, 2024
Replies: 1 comment
-
Well, the moment you post a question, you figure it out. Apparently it is important to use exactly the same import path that is also used by Slidev. With this code in import { defineAppSetup } from '@slidev/types';
import mermaid from 'mermaid/dist/mermaid.esm.mjs';
import { icons } from '@iconify-json/logos';
mermaid.registerIconPacks([
{
name: icons.prefix,
icons
},
])
export default defineAppSetup(() => {}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jgosmann
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well, the moment you post a question, you figure it out. Apparently it is important to use exactly the same import path that is also used by Slidev.
With this code in
setup/main.ts
it works: