rollup-plugin-svg-sprite
Create external svg sprite file from your bundle using Rollup and optimize it using SVGO.
Installation
# yarn yarn add rollup-plugin-svg-sprite -D # npm npm install rollup-plugin-svg-sprite -D
Usage
// rollup.config.js input: 'src/index.js' output: file: 'dist/app.js' format: 'iife' plugins:
Next, import svg files in your project:
Configuration
There are some useful options:
outputFolder
Type: string
Folder where generated svg sprite will be saved.
minify
Type: boolean
| Default: true
Minify generated svg sprite.
All other options are passed to svgo package which is used inside.
License
MIT