fix(nuxi): respect custom pages directory (#2813)

This commit is contained in:
Daniel Roe 2022-01-19 18:07:25 +00:00 committed by GitHub
parent 1ca9424910
commit 7f62ed1e32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ export default defineNuxtCommand({
const isDirChange = ['addDir', 'unlinkDir'].includes(event) const isDirChange = ['addDir', 'unlinkDir'].includes(event)
const isFileChange = ['add', 'unlink'].includes(event) const isFileChange = ['add', 'unlink'].includes(event)
const reloadDirs = ['pages', 'components', 'composables'] const reloadDirs = [currentNuxt.options.dir.pages, 'components', 'composables']
if (isDirChange) { if (isDirChange) {
const dir = reloadDirs.find(dir => file.endsWith(dir)) const dir = reloadDirs.find(dir => file.endsWith(dir))