mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +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) => {
|
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) {
|
||||||
|
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' }],
|
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',
|
||||||
|
Loading…
Reference in New Issue
Block a user