diff --git a/bin/common/utils.js b/bin/common/utils.js index b55e5ee48d..fed96bb94f 100644 --- a/bin/common/utils.js +++ b/bin/common/utils.js @@ -11,7 +11,7 @@ const esm = require('esm')(module, { } }) -const getRootDir = argv => resolve(argv._[0] || '.') +const getRootDir = argv => resolve(process.env.NUXT_ROOT_DIR || argv._[0] || '.') const getNuxtConfigFile = argv => resolve(getRootDir(argv), argv['config-file']) exports.nuxtConfigFile = getNuxtConfigFile