nuxtlabs / nuxt-component-meta

Gather Nuxt components metadata on build time and make them available on production.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with components from node_modules

farnabaz opened this issue · comments

It seems that vue-component-meta could not load components from node_modules.

Can be reproduced in this branch

Screenshot 2022-08-29 at 13 53 58

/cc @stafyniaksacha

I think this comes from default exclude (or from skipLibCheck?) from tsconfig even if we've added:

 "include": [
    "**/*"
 ]

I will check if we can have something clean

In addition, we should have NuxtLink/NuxtLayout/NuxtPage/... components too

I think they are excluded from the hook, we should add them manually to the components list

@farnabaz the example you provided is a bit tricky, node_modules is in upper scope of nuxt.options.rootDir, we may need a workspace to have correct tree, what do you think?

Do you think there is any way to resolve these files without creating a workspace? We have a similar structure in multiple packages, mainly for development environments and playgrounds.
Most likely nuxt-component-meta will be installed and used on lots of projects, forcing users to have a workspace may not bring good DX

Agree with @farnabaz it should work whatever their project structure

Do you think there is any way to resolve these files without creating a workspace?

Done in #38, let me know your feedback