mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(layouts): resolving with nested custom dir (#4135)
This commit is contained in:
parent
5979bd5e68
commit
ae2d31ed19
@ -254,9 +254,7 @@ export default class Builder {
|
||||
})
|
||||
layoutsFiles.forEach((file) => {
|
||||
const name = file
|
||||
.split('/')
|
||||
.slice(1)
|
||||
.join('/')
|
||||
.replace(new RegExp(`^${this.options.dir.layouts}/`), '')
|
||||
.replace(/\.(vue|js)$/, '')
|
||||
if (name === 'error') {
|
||||
if (!templateVars.components.ErrorPage) {
|
||||
|
2
test/fixtures/custom-dirs/nuxt.config.js
vendored
2
test/fixtures/custom-dirs/nuxt.config.js
vendored
@ -2,7 +2,7 @@ export default {
|
||||
css: [{ src: '~/custom-assets/app.css' }],
|
||||
dir: {
|
||||
assets: 'custom-assets',
|
||||
layouts: 'custom-layouts',
|
||||
layouts: 'custom-layouts/layouts',
|
||||
middleware: 'custom-middleware',
|
||||
pages: 'custom-pages',
|
||||
static: 'custom-static',
|
||||
|
Loading…
Reference in New Issue
Block a user