Skip to content

Commit e124454

Browse files
committed
fix: fix import default
1 parent 850f88f commit e124454

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cli.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ async function initConfig(env) {
5555
}
5656

5757
const defaultEnv = 'development'
58-
let config = await import(env.configPath)
58+
const rawConfig = await import(env.configPath)
59+
let config = rawConfig.default || rawConfig
5960
let environment = commander.env || process.env.NODE_ENV
6061

6162
if (!environment && typeof config[defaultEnv] === 'object') {
@@ -160,7 +161,7 @@ function invoke(env) {
160161
.action(async () => {
161162
const config = await initConfig(env)
162163
return checkStructure(config)
163-
.then(upToDate => {
164+
.then((upToDate) => {
164165
if (upToDate) {
165166
console.log(chalk.green('Structure is up to date.'))
166167
} else {

0 commit comments

Comments
 (0)