feat(kit): provide type support for module options in installModule#26744
feat(kit): provide type support for module options in installModule#26744
installModule#26744Conversation
|
|
installModule
| ], | ||
| externals: [ | ||
| '@nuxt/schema', | ||
| 'nuxt/schema', |
There was a problem hiding this comment.
we need to use @nuxt/schema within Kit as there is no nuxt dependency. The end user is the only one who should use nuxt/schema as a type import/augmentation...
(We might need to generate an augmentation against @nuxt/schema as well.)
There was a problem hiding this comment.
Makes sense, but the updated NuxtConfig that has the new modules options would be based on the types Nuxt has written for their project right, so they get imported using nuxt/schema is what I've found
(typecheck CI has now failed)
There was a problem hiding this comment.
Yes, I understand. We need to find a different solution than using nuxt/schema with @nuxt/kit...
|
Nice work! And also debugging the type issue. This will be a nice DX improvement ❤️ |
🔗 Linked issue
📚 Description
These changes relies and builds on top of #18416 (my first PR on Nuxt 😄); it extracts the options from there after module authors run prepare.
Try this in the repo playground: