Skip to content

Commit 44a11cb

Browse files
fix: enable MDX component imports in Quick Mode (#83)
Quick Mode symlinks the docs directory into .barodoc/src/content/docs/. Without preserveSymlinks, Vite resolves symlinks to their real paths, causing module resolution to fail since node_modules lives in .barodoc/. Adding preserveSymlinks: true to the generated Astro config ensures imports like `@barodoc/theme-docs` resolve from the symlink location. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c19f1a8 commit 44a11cb

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"barodoc": patch
3+
---
4+
5+
Fix MDX component imports in Quick Mode by enabling Vite preserveSymlinks

packages/barodoc/src/runtime/project.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ export default defineConfig({${siteLine}${baseLine}
282282
theme: docsTheme(),
283283
}),
284284
],
285+
vite: {
286+
resolve: {
287+
preserveSymlinks: true,
288+
},
289+
},
285290
});
286291
`;
287292
}

0 commit comments

Comments
 (0)