mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
fix(nuxi): ignore buildDir on windows too (#3999)
This commit is contained in:
parent
fdd6a91a51
commit
e4956c555f
@ -1,4 +1,4 @@
|
||||
import { resolve, relative } from 'pathe'
|
||||
import { resolve, relative, normalize } from 'pathe'
|
||||
import chokidar from 'chokidar'
|
||||
import { debounce } from 'perfect-debounce'
|
||||
import type { Nuxt } from '@nuxt/schema'
|
||||
@ -73,7 +73,7 @@ export default defineNuxtCommand({
|
||||
const watcher = chokidar.watch([rootDir], { ignoreInitial: true, depth: 1 })
|
||||
watcher.on('all', (event, file) => {
|
||||
if (!currentNuxt) { return }
|
||||
if (file.startsWith(withTrailingSlash(currentNuxt.options.buildDir))) { return }
|
||||
if (normalize(file).startsWith(withTrailingSlash(normalize(currentNuxt.options.buildDir)))) { return }
|
||||
if (file.match(/(nuxt\.config\.(js|ts|mjs|cjs)|\.nuxtignore|\.env|\.nuxtrc)$/)) {
|
||||
dLoad(true, `${relative(rootDir, file)} updated`)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user