Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

definePageMeta() warning when defined inside defineComponent() #15282

Closed
illumws opened this issue Oct 27, 2022 · 0 comments · Fixed by nuxt/framework#8536
Closed

definePageMeta() warning when defined inside defineComponent() #15282

illumws opened this issue Oct 27, 2022 · 0 comments · Fixed by nuxt/framework#8536

Comments

@illumws
Copy link

illumws commented Oct 27, 2022

Environment

  • Operating System: Windows_NT
  • Node Version: v16.18.0
  • Nuxt Version: 3.0.0-rc.12
  • Nitro Version: 0.6.0
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: ssr, target, modules, build, css, googleFonts
  • Runtime Modules: @nuxtjs/google-fonts@3.0.0-1, @pinia/nuxt@0.4.3
  • Build Modules: -

Reproduction

~/pages/index.tsx

export default defineComponent(() => {
    definePageMeta({
        middleware: 'auth',
    });

    return () => <h1>hello</h1>;
});

~/middleware/auth.ts

export default defineNuxtRouteMiddleware((to, from) => {
    console.log('hello from middleware');
});

Describe the bug

when i define the definePageMeta on inside of defineComponent as function or options i get a log error on browser console

browser console
image

apparently the error is only in the console does not reflect in the code.

Additional context

the error is only in the browser console, it does not return any error when run yarn dev

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants