fix(layouts): resolving with nested custom dir (#4135)

This commit is contained in:
Alexander Lichter 2018-10-16 22:55:28 +01:00 committed by Pooya Parsa
parent 5979bd5e68
commit ae2d31ed19
3 changed files with 2 additions and 4 deletions

View File

@ -254,9 +254,7 @@ export default class Builder {
}) })
layoutsFiles.forEach((file) => { layoutsFiles.forEach((file) => {
const name = file const name = file
.split('/') .replace(new RegExp(`^${this.options.dir.layouts}/`), '')
.slice(1)
.join('/')
.replace(/\.(vue|js)$/, '') .replace(/\.(vue|js)$/, '')
if (name === 'error') { if (name === 'error') {
if (!templateVars.components.ErrorPage) { if (!templateVars.components.ErrorPage) {

View File

@ -2,7 +2,7 @@ export default {
css: [{ src: '~/custom-assets/app.css' }], css: [{ src: '~/custom-assets/app.css' }],
dir: { dir: {
assets: 'custom-assets', assets: 'custom-assets',
layouts: 'custom-layouts', layouts: 'custom-layouts/layouts',
middleware: 'custom-middleware', middleware: 'custom-middleware',
pages: 'custom-pages', pages: 'custom-pages',
static: 'custom-static', static: 'custom-static',