From e1244542a7d396a58ba56056465e98fdcb3bb7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Berg=C3=A9?= Date: Tue, 1 Nov 2022 17:44:26 +0100 Subject: [PATCH] fix: fix import default --- src/cli.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cli.js b/src/cli.js index 40d366b..e7fcfe7 100644 --- a/src/cli.js +++ b/src/cli.js @@ -55,7 +55,8 @@ async function initConfig(env) { } const defaultEnv = 'development' - let config = await import(env.configPath) + const rawConfig = await import(env.configPath) + let config = rawConfig.default || rawConfig let environment = commander.env || process.env.NODE_ENV if (!environment && typeof config[defaultEnv] === 'object') { @@ -160,7 +161,7 @@ function invoke(env) { .action(async () => { const config = await initConfig(env) return checkStructure(config) - .then(upToDate => { + .then((upToDate) => { if (upToDate) { console.log(chalk.green('Structure is up to date.')) } else {