Skip to content

Commit 89cf473

Browse files
committed
fix: path separator on windows
1 parent 6258d15 commit 89cf473

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/internals/getCallerInfo.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ export function getCallerInfo(): [directoryPath: string | undefined, fileName: s
1616

1717
const fileName = fileInfo[0].trim().split('/pages/api/');
1818

19-
return [join('/pages/api', dirname(fileName[fileName.length - 1])), basename(fileName[fileName.length - 1])];
19+
return [
20+
join('/pages/api', dirname(fileName[fileName.length - 1])).replace(/\\/g, '/'),
21+
basename(fileName[fileName.length - 1])
22+
];
2023
}

0 commit comments

Comments
 (0)