Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mermaid with vite-plugin-wasm #6350

Open
atollk opened this issue Mar 3, 2025 · 0 comments
Open

Mermaid with vite-plugin-wasm #6350

atollk opened this issue Mar 3, 2025 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@atollk
Copy link

atollk commented Mar 3, 2025

Description

When using "vite-plugin-top-level-await" and "vite-plugin-wasm" dependencies, importing the mermaid module causes an error in production builds.
Examplary error: "Uncaught (in promise) TypeError: o is not a function"

Steps to reproduce

mermaid_bug.zip

npm run build and then npm run preview .
Opening the site should display an empty page and log errors to console.

(npm run dev on the other hand shows what it should look like: a page with the text "foo")

Screenshots

No response

Code Sample


Setup

  • Mermaid version: 11.4.1
  • Browser and Version: Firefox 135.0.1 , Chromium 133.0.6943.141

Suggested Solutions

No response

Additional Context

No response

@atollk atollk added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant