Skip to content

Commit

Permalink
fix: fix import default
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Nov 1, 2022
1 parent 850f88f commit e124454
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit e124454

Please sign in to comment.