Shims not working for Vue 3 + TypeScript
See original GitHub issueInfo
- Platform: All (I am using Linux - Ubuntu 20.04 Budgie)
- Vetur version: 0.27.3
- VS Code version: 1.49.1
Problem
So this is the issue:
This is my shim for .jpeg images:
Reproducible Case
- Create a new vue project from the CLI with Vue 3 and TypeScript,
- Add a jpeg image (happens, with all image formats),
- Then add the screenshot’d shim in
shims-jpeg.d.ts
, - Try and image that image into a Vue project.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Vue instance does not pick up shims-vue.d.ts file
The only work around I've come up with is using ((this as any).$router as VueRouter).push() , but that seems pretty ugly... How can...
Read more >Using Vue with TypeScript - Vue.js
This default setup works, but for each project we are running two TS language service instances: one from Volar, one from VSCode's built-in...
Read more >Your first Vue 3 app using TypeScript - This Dot Labs
vue module returned is not understood by TypeScript. The solution? Define a shim or declation file at the root folder of the app....
Read more >Building a Vue3 Typescript Environment with Vite - miyauci.me
Vite is a build tool developed by Evan You, the author of Vue. It uses native ES Module imports to provide a fast...
Read more >How can Laravel Mix build JS files with Vue 3 + TypeScript?
I thought Vue 3 supports TypeScript, so vue-shims.d.ts file is not needed... anyway thank you for helping!!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have made a new repo, and tried this again on Ubuntu and it seems fine over WSL2 now, (it wasn’t yesterday) so I am not sure, but I am unable to reproduce, if I see the issue again I shall push the repo up and re-open this issue.
Screenshot is not a repro case: https://github.com/vuejs/vetur/blob/master/.github/NO_REPRO_CASE.md#how-to-create-a-repro-case
And I cannot reproduce this issue: