mermaid >= 11.17 dynamically imports the UMD package fastdom. Vite's dependency scanner misses that import during vitepress dev, so the browser loads raw fastdom.js and throws "does not provide an export named 'default'". Pre-bundle fastdom only when this install can resolve it. The lockfile pins mermaid 11.16.0, which does not depend on fastdom, and an unconditional optimizeDeps.include makes Vite report "Failed to resolve dependency". Fixes #2899 Co-authored-by: Frank-zhu2000 <332350688+Frank-zhu2000@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| theme | ||
| config.mts | ||
| theme-config.d.ts | ||
| version.ts | ||