mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
fix(cli): don't let changes within buildDir
trigger nuxt reload (#420)
This commit is contained in:
parent
bf3f72e24e
commit
52a2fff31c
@ -59,6 +59,10 @@ export default defineNuxtCommand({
|
||||
const dLoad = debounce(load, 250)
|
||||
const watcher = chokidar.watch([rootDir], { ignoreInitial: true, depth: 1 })
|
||||
watcher.on('all', (_event, file) => {
|
||||
// Ignore any changes to files within the Nuxt build directory
|
||||
if (file.includes(currentNuxt.options.buildDir)) {
|
||||
return
|
||||
}
|
||||
if (file.includes('nuxt.config') || file.includes('modules') || file.includes('pages')) {
|
||||
dLoad(true)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user