From 0b8ae9abddb07e70f6d212a8b741acd753734c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 29 Sep 2021 20:09:43 +0200 Subject: [PATCH] fix(cli): restart on `app.vue` creation and removal (#597) --- packages/nuxi/src/commands/dev.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/nuxi/src/commands/dev.ts b/packages/nuxi/src/commands/dev.ts index 0af467a798..fce61d3a2a 100644 --- a/packages/nuxi/src/commands/dev.ts +++ b/packages/nuxi/src/commands/dev.ts @@ -62,6 +62,12 @@ export default defineNuxtCommand({ if (file.match(/nuxt\.config\.(js|ts|mjs|cjs)$|pages$/)) { dLoad(true, `${relative(rootDir, file)} updated`) } + if (['addDir', 'unlinkDir'].includes(_event) && file.match(/pages$/)) { + dLoad(true, `pages/ ${_event === 'addDir' ? 'created' : 'removed'}`) + } + if (['add', 'unlink'].includes(_event) && file.match(/app\.(js|ts|mjs|jsx|tsx|vue)$/)) { + dLoad(true, `${relative(rootDir, file)}/ ${_event === 'add' ? 'created' : 'removed'}`) + } }) await load(false)