I am facing an issue with vite-svg-loader + vue + ts. When I try to import an svg into a vue component, the import gets automatically deleted as it is deemed unused.
I use WebStorm and have checked my settings (eslint), but they are turned off and I cannot figure out the problem.
Here is my vite-config:
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import svgLoader from 'vite-svg-loader'
export default defineConfig({
base: "./",
plugins: [vue(), svgLoader()]
})
Here is my vue component, however, whenever I save the file, the import gets deleted:
<template>
<IconNavMain/>
</template>
<script lang="ts" setup>
import IconNavMain from "./assets/vue.svg?component"
</script>