Skip to content

vite-svg-loader

vite-svg-loader is a vite plugin to load SVG files as Vue components.

We use vite-svg-loader for loading svg images in our template.

Please refer to the official docs here.

Usage

vue
<script setup>
import MyIcon from './my-icon.svg'
</script>

<template>
  <MyIcon />
</template>