From 2b7423993be06b2375631642455c801ae2acf75f Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Wed, 7 Jun 2023 23:21:12 +0300 Subject: [PATCH] fix: local config file load error --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 7a8e3c6..3ee5e75 100644 --- a/src/config.ts +++ b/src/config.ts @@ -112,7 +112,7 @@ function wrapNoopResolver(value: Resolver): Resolver { /** @internal */ export async function getConfig(config: ConfigLoadConfig): Promise { const { config: configFile, ...logConfig } = config as Required - const url = new URL(configFile) + const url = configFile.includes("://") ? new URL(configFile) : new URL(`file://${configFile}`) if (url.protocol === "file:") { log(logConfig, LogLevel.Info, `Loading config from file ${configFile}`)