N
Nuxt3mo ago
ok3n

Nuxt 3.13 typescript vue imports issue

We're experiencing a type mismatch issue for the ref function between our main app and a library after upgrading to Nuxt 3.13. This wasn't an issue in Nuxt 3.12. Main App: - Vue 3 (v3.4.38) - Nuxt 3 (v3.13) Library: - Vue 3 (same version as main app) In the main app: - ref is auto-imported - Type is resolved from /node_modules/@vue/runtime-core/.../dist In the library: - ref is explicitly imported Type is resolved from /node_module/@vue/reactivity/dist Result: - Getting a type error: type Ref doesn't match type Ref Previous behavior (Nuxt 3.12): - ref was correctly resolved to /node_module/@vue/reactivity/dist in both cases
2 Replies
danielroe
danielroe3mo ago
Does adding @vue/runtime-dom to typescript.hoist in your nuxt config make a difference?
ok3n
ok3nOP2mo ago
Not able to make it work, we'll stay in 3.12 😦 @danielroe FYI solved by removing dependency "@vue/runtime-dom": "^3.3.11" in package.json not sure why I had it there in the first place. Have a good day!
Want results from more Discord servers?
Add your server