Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

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

Merged
merged 2 commits into from
Nov 14, 2022

Conversation

acidjazz
Copy link
Contributor

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

@codesandbox
Copy link

codesandbox bot commented Nov 11, 2022

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

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit 7e36ff2
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/636e8a14fe555e00085f1b53

@danielroe danielroe changed the title 💬 a bit more detail on this warning to specify it needs to be in a page docs: add a bit more detail in the definePageMeta warning to specify it needs to be in a page Nov 11, 2022
@pi0 pi0 merged commit 79d5634 into nuxt:main Nov 14, 2022
@pi0 pi0 mentioned this pull request Nov 15, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
danielroe pushed a commit that referenced this pull request Jan 21, 2023
@vedmant
Copy link

vedmant commented Jan 25, 2023

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
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 free to 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