Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/warm-bottles-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"codehike": patch
---

Make `remarkCodeHike` work at Next.js edge runtime
4 changes: 2 additions & 2 deletions packages/codehike/src/mdx/0.import-code-from-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ async function readFile(
let fs, path

try {
fs = (await import("fs")).default
path = (await import("path")).default
fs = require("fs")
path = require("path")
if (!fs || !fs.readFileSync || !path || !path.resolve) {
throw new Error("fs or path not found")
}
Expand Down
Loading