Skip to content

Commit

Permalink
Windows環境でのパス解決修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mkizka committed Dec 13, 2023
1 parent 62fcf9a commit be87f5b
Show file tree
Hide file tree
Showing 2 changed files with 994 additions and 1,008 deletions.
3 changes: 2 additions & 1 deletion packages/blogview/src/server/utils/helper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import fs from "fs";
import path from "path";
import { fileURLToPath } from "node:url";

export function loadJson(filepath: string) {
try {
Expand All @@ -10,7 +11,7 @@ export function loadJson(filepath: string) {
}
}

const dirname = path.dirname(new URL(import.meta.url).pathname);
const dirname = path.dirname(fileURLToPath(import.meta.url));

const pkgRootDir = path.join(dirname, "..", "..", "..");

Expand Down
Loading

0 comments on commit be87f5b

Please sign in to comment.