This commit is contained in:
Pooya Parsa 2018-04-05 20:04:36 +04:30
parent e4ee624011
commit ba4aa6dc09
1 changed files with 7 additions and 1 deletions

View File

@ -16,7 +16,13 @@ exports.loadNuxtConfig = argv => {
let options = {}
if (existsSync(nuxtConfigFile)) {
options = esm(nuxtConfigFile).default
options = esm(nuxtConfigFile)
if (!options) {
options = {}
}
if (options.default) {
options = options.default
}
} else if (argv['config-file'] !== 'nuxt.config.js') {
consola.fatal('Could not load config file: ' + argv['config-file'])
}