The expression of GlobalComponents
in different ts versions (base on [email protected].*
)
#5324
Labels
good reproduction ✨
This issue provides a good reproduction, we will be able to investigate it first
Vue - Official extension or vue-tsc version
2.2.8
VSCode version
1.99.3
Vue version
3.4.38
TypeScript version
5.6.0-dev.20240604 ~ 5.6.0-dev.20240612
、5.6.0-dev.20240801 ~ present(5.8.3)
System Info
package.json dependencies
Steps to reproduce
pnpm create vite
- create a vue3-typescript projectcode .
- use vscode check something 👇.typescript
is in the problematic version range mentioned above (the latest version5.8.3
can be reproduced), and ensure[email protected]
, you need change it. Can see:readme
❗pnpm add wot-design-uni
- a type declaration library.pnpm add @uni-helper/uni-types -D
- a component library.tsconfig.app.json
, add volar-plugin config 👇.vscode
to ensure that the configuration takes effect.src/type.ts
👇:src/App.vue
, remove the import ofHelloWorld
component ofsrc/App.vue
, and add something 👇.src/main.ts
, add something 👇.What is expected?
All the statements of
GlobalComponents
will take effect.What is actually happening?
[email protected]
➕[email protected].*
➕ typescript:5.6.0-dev.20240604 ~ 5.6.0-dev.20240612
、5.6.0-dev.20240801 ~ present(5.8.3)
The above combination makes
GlobalComponents
not work.In some projects, such as
uniapp
(base on the above combination), the global declaration component inside the project does not take effect, and only-one-dependent‘sGlobalComponents
is working. 👉 https://github.com/Vanisper/uni-app-gc-bug#readme.In some common vue3 projects, such as
vite-vue3-ts
(base on the above combination), the global declaration component inside the project is working 🎉, but still only-one-dependent‘sGlobalComponents
is working. 👉 https://github.com/Vanisper/vue-gc-bug#readme.Link to minimal reproduction
https://github.com/Vanisper/vue-gc-bug
Any additional comments?
The solution to the above problem is to install the version of vue to 3.5 (at least
3.5.0-beta
), but I still hope that it will work at least in version 3.4.By the way, this problem should be solved in volar-3.0-beta.
I don't know when 3.0 will be released at the moment.
The text was updated successfully, but these errors were encountered: