N
Nuxt8mo ago
rxsto

Is it possible to get pre-defined data from `components:extend` hook?

As of now I'm able to get a certain list of components that I have defined in ~/components/dashboard/sections, and would like to create a runtime list of metadata when building my nuxt app. Is there any way to define custom metadata on components that can be read in this build-time hook? The code I have so far:
hooks: {
'components:extend': (components) => {
console.log('build hook', components.filter(c => c.shortPath.startsWith('components/dashboard/section')).map(c => c.pascalName))
}
},
hooks: {
'components:extend': (components) => {
console.log('build hook', components.filter(c => c.shortPath.startsWith('components/dashboard/section')).map(c => c.pascalName))
}
},
Thanks!
3 Replies
∂Max
∂Max5w ago
Hey 👋 Have you found a solution to this problem?
rxsto
rxstoOP5w ago
i‘m sorry but i actually cant remember lol
∂Max
∂Max5w ago
Alright np

Did you find this page helpful?