Can you use definePageMeta within pages registered by a module?
I am registering some pages using the extendPages function within a module, but seeing the following warning while running the site:
I have added the call within
<script setup>
of my pages, it isn't used anywhere else, and only has static values supplied. I'm not sure if I'm doing something wrong? Thanks2 Replies
definePageMeta is a compiler macro, meaning it needs to be included as part of the server / client builds
you can probably do some config to get your page to be included, by default node_modules are ignored from this
this might work
but not exactly sure how it works under the hood so hard to say
Thank you, I'll look into that!
That didn't seem to prevent the warning, but in testing I did spot the
meta
property on the NuxtPage
objects you add in extendPages
, so I've switched to using that, which seems to work