Skip to content

Commit 581f6ea

Browse files
use import pattern that supports windows external drives
1 parent b6ce68c commit 581f6ea

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

@@ -287,7 +288,7 @@ const generateCommand = defineCommand({
287288
if (args["custom-config"]) {
288289
try {
289290
customConfigPath = path.resolve(process.cwd(), args["custom-config"]);
290-
customConfig = await import(customConfigPath);
291+
customConfig = await import(pathToFileURL(customConfigPath).toString());
291292
customConfig = customConfig.default || customConfig;
292293
} catch (error) {
293294
consola.error("Error loading custom config:", error);

0 commit comments

Comments
 (0)