You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using useAsyncData inside a module, the compiled type definitions are incorrect if useAsyncData is imported from #imports. Changing the import to import { useAsyncData } from 'nuxt/app' resolves the issue, but my understanding is that '#imports' is preferred.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Reproduction
The issue can be reproduced by adding this sample composable to the starter nuxt module. e.g.
npx nuxi init -t module quick-test
src/runtime/composables/useHelloWorld.ts
Run
yarn nuxt-module-build build && cat dist/runtime/composables/useHelloWorld.d.ts
which produces the following output:If the import is changed to use
nuxt/app
, the output is correct:Describe the bug
When using
useAsyncData
inside a module, the compiled type definitions are incorrect ifuseAsyncData
is imported from#imports
. Changing the import toimport { useAsyncData } from 'nuxt/app'
resolves the issue, but my understanding is that'#imports'
is preferred.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: