Open beefchimi opened 7 months ago
Yeah I have similar issue, I've resolved that by manually putting this to my index.d.ts
:
declare module '*.svg' {
import type { FunctionalComponent, SVGAttributes } from 'vue'
const src: FunctionalComponent<SVGAttributes>
export default src
}
Without the
?component
param at the end of the.svg
import, VsCode reports the import as astring
.Only by appending the
?component
will VsCode report it as aFunctionalComponent
:I tried adding
defaultImport: 'component'
to thesvgLoader
config and it made no difference.