Vite Awesome SVG Loader Documentation
What is this?
Section titled “What is this?”This is a Vite plugin that:
- Can import SVGs as:
- Can preserve line width, i.e. make icons and line art have same line width when scaling.
- Can replace colors with currentColor or a custom color via configuration.
- Automatically minimizes your SVGs with SVGO.
- Allows you to create SVG sprites via symbols using provided integrations.
vite-awesome-svg-loader
is framework-agnostic. All integrations are done as subpath imports
(for example, vite-awesome-svg-loader/vue-integration
). This means that you’ll get only what you need in your
app bundle. This also means that you can develop your own integration
using vite-awesome-svg-loader/integration-utils
import.