mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
fix(cli): restart on app.vue
creation and removal (#597)
This commit is contained in:
parent
f79f6fe40f
commit
0b8ae9abdd
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user