From 32da7d731c979fb2c384f60c7a7adf6399d44710 Mon Sep 17 00:00:00 2001 From: uki00a Date: Sat, 28 Mar 2020 19:37:25 +0900 Subject: [PATCH] fix: support ormconfig as json format (#34) --- src/connection/ConnectionOptionsReader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection/ConnectionOptionsReader.ts b/src/connection/ConnectionOptionsReader.ts index 5235821dd..c3244ea1a 100644 --- a/src/connection/ConnectionOptionsReader.ts +++ b/src/connection/ConnectionOptionsReader.ts @@ -116,7 +116,7 @@ export class ConnectionOptionsReader { connectionOptions = await mod.default; } else if (foundFileFormat === "json") { - connectionOptions = PlatformTools.load(configFile); + connectionOptions = await import(configFile); } else if (foundFileFormat === "yml") { connectionOptions = new ConnectionOptionsYmlReader().read(configFile);