Skip to content

Commit a863307

Browse files
committed
fix(www): component source
1 parent 432d5e6 commit a863307

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/www/lib/rehype-component.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ export function rehypeComponent() {
4242
file.endsWith(`${fileName}.tsx`) ||
4343
file.endsWith(`${fileName}.ts`)
4444
)
45-
}) || component.files[0]
46-
: component.files[0]
45+
}) || component.files[0]?.path
46+
: component.files[0]?.path
4747
}
4848

4949
// Read the source file.
50-
const filePath = path.join(process.cwd(), src)
50+
const filePath = src
5151
let source = fs.readFileSync(filePath, "utf8")
5252

5353
// Replace imports.

0 commit comments

Comments
 (0)