Skip to content

Commit 514e0ee

Browse files
fix(vuepress): add @vite-ignore to LazyMermaid dynamic import
Rolldown (Vite 8) tries to statically analyze and bundle dynamic imports at build time, failing with UNLOADABLE_DEPENDENCY because it cannot load the plugin's client component via the package exports glob pattern. Adding /* @vite-ignore */ skips build-time bundling and leaves the import to resolve correctly at runtime, matching local dev behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 561cdaa commit 514e0ee

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

docs/.vuepress/components/LazyMermaid.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const loadMermaidComponent = async () => {
2929
if (MermaidComponent.value) return;
3030
3131
const { default: Mermaid } = await import(
32+
/* @vite-ignore */
3233
"@vuepress/plugin-markdown-chart/client/components/Mermaid.js"
3334
);
3435
MermaidComponent.value = markRaw(Mermaid);

0 commit comments

Comments
 (0)