This commit is contained in:
Pooya Parsa 2018-04-05 20:04:36 +04:30
parent e4ee624011
commit ba4aa6dc09

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'])
}