mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 14:45:15 +00:00
fix(nuxt,schema): ignore files in buildDir
but not dir itself
This commit is contained in:
parent
802cf7a1e9
commit
98cb82ee3a
@ -99,7 +99,7 @@ function createGranularWatcher () {
|
|||||||
|
|
||||||
let pending = 0
|
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))
|
const pathsToWatch = nuxt.options._layers.map(layer => layer.config.srcDir || layer.cwd).filter(d => d && !isIgnored(d))
|
||||||
for (const pattern of nuxt.options.watch) {
|
for (const pattern of nuxt.options.watch) {
|
||||||
if (typeof pattern !== 'string') { continue }
|
if (typeof pattern !== 'string') { continue }
|
||||||
|
@ -347,7 +347,7 @@ export default defineUntypedSchema({
|
|||||||
'**/*.d.{cts,mts,ts}', // ignore type declarations
|
'**/*.d.{cts,mts,ts}', // ignore type declarations
|
||||||
'**/.{pnpm-store,vercel,netlify,output,git,cache,data}',
|
'**/.{pnpm-store,vercel,netlify,output,git,cache,data}',
|
||||||
relative(await get('rootDir'), await get('analyzeDir')),
|
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')}*.*`
|
await get('ignorePrefix') && `**/${await get('ignorePrefix')}*.*`
|
||||||
].concat(val).filter(Boolean)
|
].concat(val).filter(Boolean)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user