Skip to content

Registering additional icon sets with Mermaid #1943

Answered by jgosmann
jgosmann asked this question in Q&A
Discussion options

You must be logged in to vote

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:

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(() => {})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jgosmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant