From 7835e3611d713281b39f0b7740be5aea21f9cd8f Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 12 May 2017 00:00:22 +0430 Subject: [PATCH] correct templateVars usage --- lib/build.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/build.js b/lib/build.js index fb0208842b..5aaf8f0448 100644 --- a/lib/build.js +++ b/lib/build.js @@ -190,6 +190,7 @@ function * generateRoutesAndFiles () { ] this.options.store = fs.existsSync(join(this.srcDir, 'store')) let templateVars = { + nuxt: this.options, uniqBy: _.uniqBy, isDev: this.dev, router: { @@ -253,11 +254,11 @@ function * generateRoutesAndFiles () { imports: { serialize, hash - }, - options: options || {}, - nuxt: this.options + } }) - const content = template(templateVars) + const content = template(Object.assign({}, templateVars, { + options: options || {} + })) const path = r(this.dir, '.nuxt', dst) return writeFile(path, content, 'utf8') .then(() => {