Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

docs: add a bit more detail in the definePageMeta warning to specify it needs to be in a page - #8923

Merged
pi0 merged 2 commits into
nuxt:mainfrom
acidjazz:main
Nov 14, 2022
Merged

docs: add a bit more detail in the definePageMeta warning to specify it needs to be in a page#8923
pi0 merged 2 commits into
nuxt:mainfrom
acidjazz:main

Conversation

@acidjazz

Copy link
Copy Markdown
Contributor

This addresses nuxt/nuxt#13376 - a bit more detail on having to be in a page

@codesandbox

Copy link
Copy Markdown

CodeSandbox logoCodeSandbox logo Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify

netlifyBot commented Nov 11, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit7e36ff2
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/636e8a14fe555e00085f1b53

@danielroedanielroe changed the title 💬 a bit more detail on this warning to specify it needs to be in a pagedocs: add a bit more detail in the definePageMeta warning to specify it needs to be in a pageNov 11, 2022
@pi0
pi0 merged commit 79d5634 into nuxt:mainNov 14, 2022
@pi0pi0 mentioned this pull request Nov 15, 2022
danielroe pushed a commit that referenced this pull request Jan 21, 2023
@vedmant

Copy link
Copy Markdown

Ho do I update it globally for all pages? I tried to run it in app.vue, and getting this error:

definePageMeta() is a compiler-hint helper that is only usable inside the script block of a single file component which is also a page. Its arguments should be compiled away and passing it at runtime has no effect.

@danielroe

Copy link
Copy Markdown
Member

You can't use this macro to do that. Instead, you could use extendPages or something similar. If you have other questions, please do raise a discussion or ask a question in Discord instead of commenting on a closed PR. 🙏

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@acidjazz@vedmant@danielroe@atinux@pi0