Join with this.dir if relative path

This commit is contained in:
Sébastien Chopin 2016-12-08 19:19:39 +01:00
parent 187fec3f32
commit 6713f68443

View File

@ -51,7 +51,7 @@ class Nuxt {
// Env variables
this.dev = this.options.dev
this.dir = (typeof options.rootDir === 'string' && options.rootDir ? options.rootDir : process.cwd())
this.srcDir = (typeof options.srcDir === 'string' && options.srcDir ? options.srcDir : this.dir)
this.srcDir = (typeof options.srcDir === 'string' && options.srcDir ? resolve(this.dir, options.srcDir) : this.dir)
// If store defined, update store options to true
if (fs.existsSync(join(this.srcDir, 'store', 'index.js'))) {
this.options.store = true