mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
fix(kit): support applying .nuxtignore
within external layers (#9599)
This commit is contained in:
parent
5fdb7b6f8c
commit
1202b1ac97
@ -24,7 +24,9 @@ export function isIgnored (pathname: string): boolean {
|
||||
}
|
||||
}
|
||||
|
||||
const relativePath = relative(nuxt.options.rootDir, pathname)
|
||||
const cwds = nuxt.options._layers?.map(layer => layer.cwd).sort((a, b) => b.length - a.length)
|
||||
const layer = cwds?.find(cwd => pathname.startsWith(cwd))
|
||||
const relativePath = relative(layer ?? nuxt.options.rootDir, pathname)
|
||||
if (relativePath.startsWith('..')) {
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user