mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 14:45:15 +00:00
fix: do not usre mark but direct time
This commit is contained in:
parent
01de9c3889
commit
b0577a6bb5
@ -5,12 +5,15 @@ export default defineNuxtPlugin({
|
||||
enforce: 'pre',
|
||||
setup (nuxtApp) {
|
||||
nuxtApp.hooks.beforeEach((event) => {
|
||||
performance.mark(event.name + ' start')
|
||||
// @ts-expect-error __startTime is not a public API
|
||||
event.__startTime = performance.now()
|
||||
})
|
||||
|
||||
// After each
|
||||
nuxtApp.hooks.afterEach((event) => {
|
||||
performance.measure(event.name, {
|
||||
start: event.name + ' start',
|
||||
// @ts-expect-error __startTime is not a public API
|
||||
start: event.__startTime,
|
||||
detail: {
|
||||
devtools: {
|
||||
dataType: 'track-entry',
|
||||
|
Loading…
Reference in New Issue
Block a user