Skip to content

Commit facef7a

Browse files
committed
fix(plugin-metrics): forward plugin meta
close nuxt/nuxt#20941
1 parent 16f726c commit facef7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/devtools/src/integrations/plugin-metrics.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ globalThis.${PAYLOAD_KEY} = []
2626
function ${WRAPPER_KEY} (plugin, src) {
2727
if (!plugin)
2828
return plugin
29-
30-
return defineNuxtPlugin(async (...args) => {
29+
30+
return defineNuxtPlugin(async function (...args) {
3131
const start = performance.now()
32-
const result = await plugin(...args)
32+
const result = await plugin.apply(this, args)
3333
const end = performance.now()
3434
globalThis.${PAYLOAD_KEY}.push({
3535
src,
@@ -38,7 +38,7 @@ function ${WRAPPER_KEY} (plugin, src) {
3838
duration: end - start,
3939
})
4040
return result
41-
})
41+
}, plugin.meta)
4242
}
4343
`
4444

0 commit comments

Comments
 (0)