Skip to content

ephor/svg-sprite-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

svg-sprite-plugin

Webpack plugin based on Svg-sprite

Installation

npm i svg-sprite-plugin --save-dev

Usage

//webpack.config.js
const SVGSprites = require('svg-sprite-plugin');
module.exports = {
  plugins: [
    new SVGSprites({
      src: 'public/image/svg_icons/',
      log: 'verbose',
      sprites_conf: {
        'sprite-1': {
           mode: {
             defs: {
               dest: path.resolve('svg_sprites/sprite-dest-1/defs'),
               sprite: 'sprite.svg',
               example: true,
           },
        },
        'sprite-2': {
           mode: {
             defs: {
               dest: path.resolve('svg_sprites/sprite-dest-2/defs'),
               sprite: 'sprite.svg',
               example: true,
           },
        },
      }
    })
  ]
}

Other configuration options

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published