This repository was archived by the owner on Oct 23, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
vue-tsc --noEmit show error when using Svg as component #80
Labels
bug
Something isn't working
Comments
Create In my case it is autogenerated by here is my tsconfig
|
I've tried and it is not working for me. |
Using |
@johnsoncodehk This is still not working with version 0.27.28 @sapphi-red can you tell in more detail? in what find you make changes? |
Instead of adding declare module '*.svg?component' {
import { DefineComponent } from 'vue'
const src: DefineComponent
export default src
} to it. |
@sapphi-red thank you, it works like a charm! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Vue Language Features (Volar) version v0.27.27
TypeScript Vue Plugin (Volar) version v0.27.27
I am using https://github.com/jpkleemans/vite-svg-loader to load svg file as component
import ArrowLeftIcon from '@/assets/arrow-left-icon.svg?component'
usage in template
vue-tsc show error in <ArrowLeftIcon
my tsconfig
The text was updated successfully, but these errors were encountered: