Closed JasonMan34 closed 2 years ago
@JasonMan34 No problem for me when running it on codesandbox. What package manager do you use ? Sandbox: https://codesandbox.io/s/vibrant-shannon-8ezs3?file=/package.json
I use npm (6.14.15)
The npm run dev
script runs fine for me too, but running build
on the above repository fails on type checking
Looking into it, Vite validates all types with vue-tsc --noEmit
before building, and it fails on the types for this package
If you have a tsconfig.json
, add skipLibCheck:true
and reference it in your vue-tsc script. The types comes from vue-demi
This fixes the issue I had with building (thanks!), but I still have typing issues during development Any idea on how to resolve this?
I will look into this! Can you try npx vue-demi-switch 3
?
Didn't change anything :x
Can you try 0.5.11? Should be fixed :D
It's definitely better, vue-tsc errors dropped from 63 to 10. And vscode is fine with the index.d.ts file now, but still has trouble with some of the others
@JasonMan34 Can you try 0.6.0-alpha.6
? I prioritized vue 3 types on this version and kept 0.5.x
version for vue 2 compatible types. If you are using Volar, you should have type check and autocompletion in props :)
Typing seems good for components :D
Although there is still an issue when building without skipLibCheck:true
Yayyy, the last type error is fixed in 0.6.0-alpha.7 ! Thanks for being reactive :D
Thanks for making the package ^^
But I'm still getting the error in utils.d.ts
in 0.6.0-alpha.7 😅
I think the basis of all these errors comes from the fact that when running npm install on this repo (on vue-chart-3 that is), vue 2 gets installed, rather than vue 3, so some typings break when used in a vue 3 project
Would replacing Vue
with ComponentPublicInstance
be a good solution here?
Any word on this?
Should be fixed with new version!
Works fine now, thanks for the support!
Installing (and importing) this package on a clean vue-vite project with typescript causes build errors
Relevant dependencies:
Minimal reproduction repo - https://github.com/JasonMan34/vite-vue-chart-3-bug