fix(nuxt3): reresolve app entrypoint when changes to app.vue are detected (#363)

This commit is contained in:
Daniel Roe 2021-07-23 15:42:49 +01:00 committed by GitHub
parent 5d5516dd1d
commit 5d78c14ed6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,9 @@ export async function build (nuxt: Nuxt) {
watch(nuxt)
nuxt.hook('builder:watch', async (event, path) => {
if (event !== 'change' && /app|plugins/i.test(path)) {
if (path.match(/app/i)) {
app.main = null
}
await generateApp(nuxt, app)
}
})