diff --git a/src/parse-env-file.ts b/src/parse-env-file.ts index 20c00b7..7e44d88 100644 --- a/src/parse-env-file.ts +++ b/src/parse-env-file.ts @@ -34,12 +34,18 @@ export async function getEnvFileVars(envFilePath: string): Promise if (isPromise(env)) { env = await env } + + return env; } - else { - const file = readFileSync(absolutePath, { encoding: 'utf8' }) - env = parseEnvString(file) + + const file = readFileSync(absolutePath, { encoding: 'utf8' }) + + switch (ext) { + // other loaders can be added here + + default: + return parseEnvString(file) } - return env } /**