Skip to content

Severe TypeScript Performance Degradation with @tanstack/vue-query in Vue 3 + TypeScript Project #9200

Open
@nghiaxb

Description

@nghiaxb

Describe the bug

After installing and importing @tanstack/vue-query (and related packages), VSCode performance drops significantly in my Vue 3 + TypeScript project.

The following editor features are noticeably slowed down or sometimes completely hang:

  • IntelliSense (auto-completion)
  • Go to definition / Peek definition
  • Hover info
  • Snippets and parameter hints

This makes it nearly impossible to work productively in a large codebase.

Steps to reproduce

If needed, I can provide a minimal reproduction repo, but any Vue 3 + TS project with @tanstack/vue-query + a few generic-heavy useQuery() calls should reproduce the issue.

Expected behavior

As a user, I expected smooth and fast TypeScript support (autocomplete, type inference, navigation, etc.) when using @tanstack/vue-query in a Vue 3 + TypeScript project.

However, I am seeing severe TypeScript performance degradation — VSCode becomes slow, IntelliSense suggestions freeze, and navigating through types is delayed significantly.

Screenshots or Videos

Image

Platform

Environment

  • Vue version: 3.x
  • TypeScript version: 5.x
  • Node.js version: >=18
  • VSCode: Latest
  • TanStack packages:
    {
      "@tanstack/vue-query": "^5.67.3",
      "@tanstack/vue-table": "^8.21.2",
      "@tanstack/vue-query-devtools": "^5.62.9"
    }
    

Window

  • **Window: 11 Pro 64-bit
  • **Processor: 12th Gen Intel(R) Core(TM) i5-12400 (12 CPUs), ~2,5GHz
  • **Ram: 16GB

Tanstack Query adapter

vue-query

TanStack Query version

5.67.3

TypeScript version

5.6.3

Additional context

tsconfig.js

{
  "files": [],
  "references": [
    {
      "path": "./tsconfig.node.json"
    },
    {
      "path": "./tsconfig.app.json"
    }
  ]
}

tsconfig.app.json

{
  "extends": "@vue/tsconfig/tsconfig.dom.json",
  "include": [
    "*.d.ts",
    "src/*.d.ts",
    "src/**/*",
    "src/**/*.{ts,tsx,vue}",
    "shims-global.d.ts",
    "shims-vue-trumbowyg.d.ts",
    "node_modules/vite-plugin-pwa/client.d.ts",
  ],
  "exclude": [
    "src/**/__tests__/*"
  ],
  "compilerOptions": {
    "composite": true,
    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
    "skipLibCheck": true,
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}

tsconfig.node.json

{
  "extends": "@tsconfig/node22/tsconfig.json",
  "include": [
    "vite.config.*",
    "vitest.config.*",
    "cypress.config.*",
    "nightwatch.conf.*",
    "playwright.config.*"
  ],
  "compilerOptions": {
    "composite": true,
    "noEmit": true,
    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "types": [
      "node"
    ],
    "skipLibCheck": true,
    "strict": false
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions