generated from Hebilicious/nuxt-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Environment
"@hebilicious/vue-query-nuxt": "^0.3.0",
"nuxt": "^4.0.3",
Reproduction
https://codesandbox.io/p/devbox/stupefied-thompson-lvcs8w
Describe the bug
After migrate tsconfig.json
to the new project references: https://nuxt.com/docs/4.x/getting-started/upgrade#typescript-configuration-splitting , auto imports in vue-query.config.ts
export default defineVueQueryPluginHook(() => ({}));
will have:
vue-query.config.ts:1:16 - error TS2304: Cannot find name 'defineVueQueryPluginHook'.
1 export default defineVueQueryPluginHook(() => ({}));
~~~~~~~~~~~~~~~~~~~~~~~~
And import it:
import { defineVueQueryPluginHook } from "@hebilicious/vue-query-nuxt/dist/runtime/composables/defineVueQueryPluginHook.js";
will cause
Cannot find package '@hebilicious/vue-query-nuxt/dist/runtime/composables/defineVueQueryPluginHook.js' imported from 'virtual:nuxt:<...>.nuxt%2Finternal.vue-query-plugin-hook.mjs'
in any page.
An workaround is including it manually in nuxt.config.ts
:
export default defineNuxtConfig({
typescript: {
tsConfig: { include: ['../vue-query.config.ts'] }
}
});
Additional context
No response
Logs
No response
Metadata
Metadata
Assignees
Labels
No labels