Skip to content

feat(language-core): introduce globalTypesPath option for non-npm like environment #5505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jul 17, 2025

Conversation

KazariEX
Copy link
Member

@KazariEX KazariEX commented Jul 16, 2025

When using Yarn PnP, the vue dependency cannot be found in node_modules. As a result, we generate a copy of the global types in every file, which significantly increases the memory overhead of the language service.

By configuring this option, we allow users to manually specify the path for generating the global types file.

For example:

{
  "vueCompilerOptions": {
    "globalTypesPath": "./vue-global-types.d.ts"
  }
}

And add it in .gitignore:

vue-global-types.d.ts

Copy link

pkg-pr-new bot commented Jul 16, 2025

Open in StackBlitz

vue-component-meta

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-meta@5505

vue-component-type-helpers

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@5505

@vue/language-core

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-core@5505

@vue/language-plugin-pug

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@5505

@vue/language-server

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-server@5505

@vue/language-service

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-service@5505

vue-tsc

npm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@5505

@vue/typescript-plugin

npm i https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@5505

commit: 422e7c1

@KazariEX KazariEX force-pushed the feat/global-types-path branch from cd44d53 to ac85c8d Compare July 16, 2025 15:06
@johnsoncodehk johnsoncodehk merged commit 9ad6714 into vuejs:master Jul 17, 2025
6 checks passed
@KazariEX KazariEX deleted the feat/global-types-path branch July 17, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants