We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b886e6 commit 7c6129fCopy full SHA for 7c6129f
packages/core/core.ts
@@ -327,8 +327,13 @@ export function ensureFilepath(filePath: string): string {
327
if (!filePath) {
328
throw Error("Empty filepath provided");
329
}
330
+
331
+ const absolutePath = path.isAbsolute(filePath)
332
+ ? filePath
333
+ : path.join(process.cwd(), filePath);
334
335
// file: schema is required on Windows
- const fullPath = "file://" + path.join(process.cwd(), filePath);
336
+ const fullPath = "file://" + absolutePath;
337
return [".js", ".mjs", ".cjs"].some((suffix) => fullPath.endsWith(suffix))
338
? fullPath
339
: fullPath + ".js";
0 commit comments