nuxt icon indicating copy to clipboard operation
nuxt copied to clipboard

Imports not defined in definePageMeta middleware

Open toniengelhardt opened this issue 3 years ago • 0 comments

Environment

See reproduction

Reproduction

https://stackblitz.com/edit/nuxt-bug-import-not-defined-in-middleware

Describe the bug

Open the console in repro and click test.

uuid4 is not defined error appears even though it is imported correctly.

Additional context

This only happens if the middleware is defined in definePageMeta, if I put the same function into a defineNuxtRouteMiddleware in /middleware it works.

Logs

No response

toniengelhardt avatar Feb 17 '23 16:02 toniengelhardt