Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interledger/docs-design-system",
"version": "0.14.0",
"version": "0.14.1",
"packageManager": "pnpm@10.15.0",
"type": "module",
"description": "Shared styles and components used across all Interledger Starlight documentation sites",
Expand Down
9 changes: 8 additions & 1 deletion src/components/Mermaid.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ const { graph, hasBorder = false } = Astro.props
</style>

<script>
import mermaid from 'mermaid'
// Import the pre-bundled ESM build, not the bare `mermaid` specifier.
// The bare specifier resolves to `dist/mermaid.core.mjs`, which imports
// dayjs and other CommonJS packages as externals. A bundler fixes that
// interop at build time, but the Vite dev server does not, so the module
// throws "does not provide an export named 'default'" and no diagram
// renders. The `.esm.min.mjs` build has those dependencies inlined and
// works in both dev and production.
import mermaid from 'mermaid/dist/mermaid.esm.min.mjs'
mermaid.initialize({ startOnLoad: true })
</script>
Loading