Configure Mermaid
Environment: client
This setup function will only run on client side. Make sure the browser compatibility when importing packages.
Create ./setup/mermaid.ts
with the following content:
import { defineMermaidSetup } from '@slidev/types'
export default defineMermaidSetup(() => {
return {
theme: 'forest',
}
})
With the setup, you can provide a custom default setting for Mermaid. Refer to the type definitions and its documentation for more details.