vite-awesome-svg-loader
A Vite plugin that:
- Can import SVGs as:
- Can preserve line width, i.e. make images retain line width regardless of the image size.
- Can replace colors with
currentColoror a custom color via configuration (seereplaceColorsListoption). - Will automatically minimize your SVGs using SVGO.
- Allows you to create SVG sprites using provided integrations.
vite-awesome-svg-loader is framework-agnostic.
However, to create SVG symbols, some boilerplate code in form of components is required. These components are provided in the integrations.
All integrations are provided as ES modules in separate subpath imports
(for example, vite-awesome-svg-loader/vue-integration), so your app will contain only required code.
You can integrate vite-awesome-svg-loader with any framework
using vite-awesome-svg-loader/integration-utils package.
Installation
npm i vite-awesome-svg-loaderDocs
The docs website is the central knowledge base for
vite-awesome-svg-loader.