fix(nuxt,schema): ignore files in buildDir but not dir itself

This commit is contained in:
Daniel Roe 2023-10-30 18:17:53 +09:00
parent 802cf7a1e9
commit 98cb82ee3a
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ function createGranularWatcher () {
let pending = 0
const ignoredDirs = new Set([...nuxt.options.modulesDir, nuxt.options.buildDir])
const ignoredDirs = new Set(nuxt.options.modulesDir)
const pathsToWatch = nuxt.options._layers.map(layer => layer.config.srcDir || layer.cwd).filter(d => d && !isIgnored(d))
for (const pattern of nuxt.options.watch) {
if (typeof pattern !== 'string') { continue }

View File

@ -347,7 +347,7 @@ export default defineUntypedSchema({
'**/*.d.{cts,mts,ts}', // ignore type declarations
'**/.{pnpm-store,vercel,netlify,output,git,cache,data}',
relative(await get('rootDir'), await get('analyzeDir')),
relative(await get('rootDir'), await get('buildDir')),
relative(await get('rootDir'), join(await get('buildDir'), '**/*')),
await get('ignorePrefix') && `**/${await get('ignorePrefix')}*.*`
].concat(val).filter(Boolean)
},