nuxtlabs / nuxt-component-meta

Gather Nuxt components metadata on build time and make them available on production.
72 stars 8 forks source link

Enable Module Support in nuxt-component-meta CLI #74

Open romhml opened 1 month ago

romhml commented 1 month ago

Currently, the nuxt-component-meta CLI does not resolve components correctly for modules.

Here's a reproduction: https://stackblitz.com/edit/stackblitz-starters-kjvwap

Running pnpm nuxt-component-meta . does not find any components in the module. Although pnpm nuxt-component-meta src/runtime will find components, it will not resolve any types from #build since the build directory will not be resolved correctly.

The expected behaviour would be to generate component meta for a Nuxt Module when running pnpm nuxt-component-meta ..

romhml commented 1 month ago

I found a workaround by running this command on the playground app: pnpm nuxt-component-meta playground --outputDir ../.component-meta/