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 cd9f66a commit c8388f1Copy full SHA for c8388f1
src/_utils.ts
@@ -3,6 +3,7 @@ import { networkInterfaces } from "node:os";
3
import { relative, resolve } from "node:path";
4
import { colors } from "consola/utils";
5
import { fileURLToPath } from "mlly";
6
+import { isAbsolute } from "pathe";
7
import type { Certificate, HTTPSOptions } from "./types";
8
9
export async function resolveCert(
@@ -79,7 +80,11 @@ export async function createImporter(input: string, _cwd?: string) {
79
80
interopDefault: true,
81
});
82
- const entry = _jitiRequire.resolve(input);
83
+ if (!isAbsolute(input) && !input.startsWith(".")) {
84
+ input = `./${input}`;
85
+ }
86
+
87
+ const entry = _jitiRequire.resolve(resolve(cwd, input));
88
89
const _import = () => {
90
const r = _jitiRequire(input);
0 commit comments