fix(nuxt): don't call timeEnd unless we're debugging (#20424)

This commit is contained in:
Daniel Roe 2023-04-20 22:18:32 +01:00 committed by GitHub
parent 0d10e9734b
commit 8b7df05ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,9 @@ async function watch (nuxt: Nuxt) {
]
})
watcher.then((subscription) => {
console.timeEnd('[nuxt] builder:parcel:watch')
if (nuxt.options.debug) {
console.timeEnd('[nuxt] builder:parcel:watch')
}
nuxt.hook('close', () => subscription.unsubscribe())
})
}