From 57997e294e9869d661540e18a7605425c56d7fc4 Mon Sep 17 00:00:00 2001 From: Alexandre Chopin Date: Wed, 7 Dec 2016 13:30:25 +0100 Subject: [PATCH] add layouts folder for extends app --- lib/build/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/build/index.js b/lib/build/index.js index 45725f99eb..820f276a10 100644 --- a/lib/build/index.js +++ b/lib/build/index.js @@ -202,9 +202,15 @@ function * generateRoutesAndFiles () { if (files.includes('pages/_app.vue')) { templateVars.appPath = r(this.dir, 'pages/_app.vue') } + if (fs.existsSync(join(this.dir, 'layouts', 'app.vue'))) { + templateVars.appPath = r(this.dir, 'layouts/app.vue') + } if (files.includes('pages/_error.vue')) { templateVars.components.ErrorPage = r(this.dir, 'pages/_error.vue') } + if (fs.existsSync(join(this.dir, 'layouts', 'error.vue'))) { + templateVars.appPath = r(this.dir, 'layouts/error.vue') + } let moveTemplates = templatesFiles.map((file) => { return readFile(r(__dirname, '..', 'app', file), 'utf8') .then((fileContent) => {