Sybrn
Adding Types To Nuxt Module
This is great information! 🙏 Thanks for pointing it out, I had no idea that there was such a difference. It's indeed true that the components and types UI library are/should be available when they are consumed only.
I'm going to read up on the explicit relative imports within a runtime directory.
And look into the layers. Thanks for pointing me in that direction 😊
14 replies
Adding Types To Nuxt Module
How is it going for you?
I'm currently building a module myself and managed to add types with the
addImports
util with the option type set to true.
The types should be imported from a 3rd party package.
And my ts and IDE is happy, but Vue isn't. I get this error: Pre-transform error: [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type
I don't understand where it comes from tho.
I also tried to add a type template and use a nuxt hook to prepare the types.
My repo (pr): https://github.com/carwack/ark-ui-nuxt/pull/1/files14 replies