Skip to content

Commit c53600d

Browse files
thechucklingatomsmorimoto
authored andcommitted
use import pattern that supports windows external drives
1 parent 1df670e commit c53600d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { TemplatesGenConfig } from "./src/commands/generate-templates/configurat
66
import { CodeGenConfig } from "./src/configuration.js";
77
import { HTTP_CLIENT } from "./src/constants.js";
88
import { generateApi, generateTemplates } from "./src/index.js";
9+
import { pathToFileURL } from "url";
910

1011
const templateGenBaseConfig = new TemplatesGenConfig({});
1112

@@ -282,7 +283,7 @@ const generateCommand = defineCommand({
282283
if (args["custom-config"]) {
283284
try {
284285
customConfigPath = path.resolve(process.cwd(), args["custom-config"]);
285-
customConfig = await import(customConfigPath);
286+
customConfig = await import(pathToFileURL(customConfigPath).toString());
286287
customConfig = customConfig.default || customConfig;
287288
} catch (error) {
288289
consola.error("Error loading custom config:", error);

0 commit comments

Comments
 (0)