nuxt / module-builder

Complete solution to build and ship Nuxt modules.
MIT License
212 stars 22 forks source link

Missing entries in imports.d.ts #197

Closed dvdmlln closed 3 months ago

dvdmlln commented 7 months ago

Hi,

I recently upgraded @nuxt/module-builder and also updated the tsconfig.json in my module to extend ./.nuxt/tsconfig.json instead of ./playground/.nuxt/tsconfig.json. However the ./.nuxt/imports.d.ts file is missing the auto imports declared in my module.ts file. This leads to type errors, while there are no runtime errors because the imports.mjs contains the entries missing in the types declarations. The ./playground/.nuxt/imports.d.ts file also contains the missing entries.

Best regards David

guirak commented 5 months ago

Hello,

I'm encountering errors in IDE with basic vue types like ref that I related here :

https://github.com/nuxt/starter/issues/615#issue-2068635541

The problem is present only for the code of the modules, not the playground.

Can this problem be related to this issue ?

danielroe commented 3 months ago

@guirak This is deliberate - you need to explicitly import them from vue or #imports in your runtime module code.

@dvdmlln would you be able to provide a reproduction?

dvdmlln commented 3 months ago

@guirak This is deliberate - you need to explicitly import them from vue or #imports in your runtime module code.

@dvdmlln would you be able to provide a reproduction?

Seems like the problem doesn't occur anymore with recent versions of module-builder and nuxt :thumbsup:

guirak commented 3 months ago

Thank you :)