mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
fix(nuxi): don't restart when build directory changes (#613)
This commit is contained in:
parent
2b51af76d8
commit
40d3aae439
@ -59,7 +59,8 @@ export default defineNuxtCommand({
|
||||
const dLoad = debounce(load, 250)
|
||||
const watcher = chokidar.watch([rootDir], { ignoreInitial: true, depth: 1 })
|
||||
watcher.on('all', (_event, file) => {
|
||||
if (file.match(/nuxt\.config\.(js|ts|mjs|cjs)$|pages$/)) {
|
||||
if (file.startsWith(currentNuxt.options.buildDir)) { return }
|
||||
if (file.match(/nuxt\.config\.(js|ts|mjs|cjs)$/)) {
|
||||
dLoad(true, `${relative(rootDir, file)} updated`)
|
||||
}
|
||||
if (['addDir', 'unlinkDir'].includes(_event) && file.match(/pages$/)) {
|
||||
|
Loading…
Reference in New Issue
Block a user