diff --git a/packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts b/packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts index 07c1f251b5..c740238880 100644 --- a/packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts +++ b/packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts @@ -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',