vite-awesome-svg-loader
v3.0.3
Published
Imports SVGs as source code, base64 and data URI. Preserves stroke width, replaces colors with currentColor or custom colors. Optimizes SVGs with SVGO. Creates SVG sprites.
Maintainers
Readme
vite-awesome-svg-loader
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
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. 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.
Installation
npm i vite-awesome-svg-loaderDocs
The docs website is the central knowledge base for
vite-awesome-svg-loader.
