vuetifyjs / vuetifyjs/vuetify

[Bug Report][3.12.7] Importing createVuetify adds about 520 MB TypeScript RSS

Open
#23,005 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P: low S: triage typescript
Dominant language
TypeScript
Stars
41k
Forks
7.1k
Avg merge
1d 21h
Merged PRs (30d)
11

Description

Environment
  • Vuetify: 3.12.7
  • Vue: 3.5.35
  • TypeScript: 6.0.3
  • Node: 24.18.0
  • pnpm: 9.15.4
  • OS: macOS arm64
Reproduction

Minimal reproduction: https://gist.github.com/hhochart/5980e81e4938d30c13550474457560a1

pnpm install
/usr/bin/time -l pnpm profile:plain
/usr/bin/time -l pnpm profile:vuetify

The plain case contains one two-line TypeScript file. The Vuetify case only adds:

import { createVuetify } from 'vuetify'

export const plugin = createVuetify()

Both projects use skipLibCheck: true and noEmit: true.

Actual behavior
Metric Plain TypeScript Importing createVuetify
Files 52 443
Declaration lines 0 262,188
TypeScript reported memory 61,730 KB 548,208 KB
Peak RSS 151,961,600 bytes 671,858,688 bytes

A single createVuetify import therefore adds roughly 520 MB peak RSS before any application or Vue SFC template type-checking is involved.

In a Vue monorepo using Volar, each configured application project pays this fixed cost. Three simultaneously open apps pushed the semantic tsserver above its default 3 GB heap and caused repeated FatalProcessOutOfMemory aborts.

The declaration expansion appears to come from lib/framework.d.ts: its GlobalComponents augmentation references every component through typeof import('vuetify/components'), and the vuetify/components barrel re-exports the complete component catalog. skipLibCheck avoids checking these declarations but TypeScript still parses and binds them.

Expected behavior

Importing the Vuetify plugin should not require TypeScript to load the declarations for every component. Ideally the framework/global-component typing could be split or made opt-in so applications using automatic imports only load declarations for components they actually use.

Additional measurement

In the real project, a shared style package containing 395 TypeScript lines peaked at 832 MB. Replacing only Vuetify's declarations with a stub reduced the same check to 279 MB. A full Vue application loaded 426 Vuetify declaration files totaling about 239k physical declaration lines.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the gist reproduction with the two profiling commands, then inspect lib/framework.d.ts and the vuetify/components barrel described in the report. Trace how the GlobalComponents augmentation expands the component declarations. Done means the createVuetify import no longer loads the full component catalog while retaining the intended framework or component typing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.