Skip to content

Commit 432d5e6

Browse files
committed
fix: code view for mdx
1 parent 8f0c26f commit 432d5e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/www/lib/rehype-component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ export function rehypeComponent() {
106106
try {
107107
for (const style of styles) {
108108
const component = Index[style.name][name]
109-
const src = component.files[0]
109+
const src = component.files[0]?.path
110110

111111
// Read the source file.
112-
const filePath = path.join(process.cwd(), src)
112+
const filePath = src
113113
let source = fs.readFileSync(filePath, "utf8")
114114

115115
// Replace imports.

0 commit comments

Comments
 (0)