Skip to content

vue-query.config.ts is not including in the .nuxt/tsconfig.app.json that introduced in nuxt 4 #119

@n0099

Description

@n0099

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions