-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Error resolving buefy components.d.ts file #24
Comments
If I copy the parts I need to a local file (
...it runs fine. (Not a great workaround though.) Anyone have any ideas why vite can't resolve this file properly in the minimal repro project? |
You can use |
It also happens with |
related: vitejs/vite#4810 |
Thanks @sapphi-red! That works. Much better than having to duplicate a bunch of code. |
it also happens with echarts with 'echarts/types/dist/shared.d.ts' Thanks @sapphi-red ! It works! It's in the doc: https://vitejs.dev/guide/features.html#typescript |
Just because they documented it doesn't mean it's not a bug. 😄 That's just a workaround "to avoid potential problems like type-only imports being incorrectly bundled" (i.e. a bug). |
@asmaloney okay so, I I understand you correctly the problem is with typescript ? https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export ? |
I have no idea where the bug is - I just reported it. |
Yeah, you should use type only imports where it's possible. But there's some libraries that imports type def files in the component. #24 (comment) |
related PR: vitejs/vite#5850 |
Describe the bug
(See discussion.)
Short version:
When I try to
import { BModalComponent } from 'buefy/types/components'
in a vue2 project, vite will fail to run:Reproduction
https://github.com/asmaloney/vite-resolve-bug
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: